File indexing completed on 2024-05-12 15:56:57

0001 /*
0002  *  SPDX-FileCopyrightText: 2013 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef __KIS_ASSERT_EXCEPTION_H
0008 #define __KIS_ASSERT_EXCEPTION_H
0009 
0010 #include <stdexcept>
0011 #include <QException>
0012 
0013 class KisAssertException : public std::runtime_error, public QException
0014 {
0015 public:
0016     KisAssertException(const std::string& what_arg)
0017         : std::runtime_error(what_arg)
0018     {
0019     }
0020 
0021     QException* clone() const override { return new KisAssertException(*this); }
0022     void raise() const override { throw *this; }
0023 };
0024 
0025 #endif /* __KIS_ASSERT_EXCEPTION_H */