CuteHMI - CuteHMI (CuteHMI.2)
ErrorException.hpp
1 #ifndef H_EXTENSIONS_CUTEHMI_2_INCLUDE_CUTEHMI_ERROREXCEPTION_HPP
2 #define H_EXTENSIONS_CUTEHMI_2_INCLUDE_CUTEHMI_ERROREXCEPTION_HPP
3 
4 #include "ExceptionMixin.hpp"
5 #include "ErrorInfo.hpp"
6 
7 namespace cutehmi {
8 
12 class CUTEHMI_API ErrorException:
13  public ExceptionMixin<ErrorException>
14 {
16 
17  public:
18  template <class ERR>
19  explicit ErrorException(ERR error);
20 
21  const ErrorInfo & info() const;
22 
23  private:
24  ErrorInfo m_errorInfo;
25 };
26 
27 template <class ERR>
29  Parent(error.str()),
30  m_errorInfo(::cutehmi::errorInfo<ERR>(error))
31 {
32 }
33 
34 }
35 
36 #endif
37 
38 //(c)C: Copyright © 2018-2019, Michał Policht <michal@policht.pl>. All rights reserved.
39 //(c)C: This file is a part of CuteHMI.
40 //(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.
41 //(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.
42 //(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::ErrorException::ErrorException
ErrorException(ERR error)
Definition: ErrorException.hpp:28
cutehmi::errorInfo
ErrorInfo errorInfo(ERR err)
Get error info.
Definition: ErrorInfo.hpp:38
cutehmi::ErrorException
Error exception.
Definition: ErrorException.hpp:12
cutehmi::ExceptionMixin
Exception mixin.
Definition: ExceptionMixin.hpp:16
cutehmi
Definition: constants.hpp:6
cutehmi::ErrorInfo
Error info.
Definition: ErrorInfo.hpp:19