BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
Error.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/Util/Error.cpp
6 //! @brief Implements 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 #include "GUI/Util/Error.h"
16 
17 Error::Error(const QString& message)
18  : m_messageAsLatin1(message.toLatin1())
19 {
20 }
21 
22 const char* Error::what() const noexcept
23 {
24  return m_messageAsLatin1.data();
25 }
Defines error class.
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