CuteHMI - CuteHMI (CuteHMI.2)
InplaceError.hpp
1 #ifndef H_EXTENSIONS_CUTEHMI_2_INCLUDE_CUTEHMI_INPLACEERROR_HPP
2 #define H_EXTENSIONS_CUTEHMI_2_INCLUDE_CUTEHMI_INPLACEERROR_HPP
3 
4 #include "internal/common.hpp"
5 
6 #include "Error.hpp"
7 
8 namespace cutehmi {
9 
15 struct CUTEHMI_API InplaceError:
16  public Error
17 {
31  InplaceError(const QString & message = "Error.", const char * file = nullptr, int line = 0, const char * function = nullptr, int code = Error::FAIL);
32 
37  QString str() const;
38 
40  const char * file;
41  int line;
42  const char * function;
43 };
44 
45 }
46 
47 #define CUTEHMI_ERROR(MESSAGE) cutehmi::InplaceError(MESSAGE, __FILE__, __LINE__, Q_FUNC_INFO)
48 
49 Q_DECLARE_METATYPE(cutehmi::InplaceError)
50 
51 #endif
52 
53 //(c)C: Copyright © 2019, Michał Policht <michal@policht.pl>. All rights reserved.
54 //(c)C: This file is a part of CuteHMI.
55 //(c)C: CuteHMI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
56 //(c)C: CuteHMI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
57 //(c)C: You should have received a copy of the GNU Lesser General Public License along with CuteHMI. If not, see <https://www.gnu.org/licenses/>.
cutehmi::InplaceError::file
const char * file
Definition: InplaceError.hpp:40
cutehmi::Error::FAIL
@ FAIL
Definition: Error.hpp:22
cutehmi::InplaceError
In-place error.
Definition: InplaceError.hpp:15
cutehmi::Error
Standarized error.
Definition: Error.hpp:15
cutehmi
Definition: constants.hpp:6
QString
cutehmi::InplaceError::line
int line
Definition: InplaceError.hpp:41
cutehmi::InplaceError::message
QString message
Definition: InplaceError.hpp:39