BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
Error.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/Util/Error.h
6 //! @brief Defines error class
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_UTIL_ERROR_H
16 #define BORNAGAIN_GUI_UTIL_ERROR_H
17 
18 #include <QByteArray>
19 #include <QString>
20 
21 class Error : public std::exception {
22 public:
23  explicit Error(const QString& message);
24  const char* what() const noexcept override;
25 
26 private:
27  QByteArray m_messageAsLatin1;
28 };
29 
30 #endif // BORNAGAIN_GUI_UTIL_ERROR_H
Definition: Error.h:21
Error(const QString &message)
Definition: Error.cpp:17
QByteArray m_messageAsLatin1
Definition: Error.h:27
const char * what() const noexcept override
Definition: Error.cpp:22