10#ifndef FMTEXCEPTION_Hm_included
11#define FMTEXCEPTION_Hm_included
18#include <boost/serialization/access.hpp>
19#include <boost/serialization/base_object.hpp>
20#include <boost/serialization/string.hpp>
166 const std::string& p_method,
const std::string& p_file,
const int& p_line,
167 const std::string& p_FrenchDescription,
const std::string& p_EnglishDescription);
198 const char*
what() const noexcept override;
210 void setHold(
bool side);
216 inline
std::
string getMethod()
const
286 int _getPrintLevel()
const;
292 const std::string& _getUserMessage()
const;
297 void _buildMessage();
305 friend class boost::serialization::access;
306 template<
class Archive>
307 void serialize(Archive& ar,
const unsigned int version);
323 std::string m_method;
332 std::string m_FrenchDescription;
335 std::string m_EnglishDescription;
344 std::string m_UserMessage;
#define FMTEXPORT
Definition: FMTutility.h:125
Base exception class for FMT holding the type, section and message of a given exception.
Definition: FMTException.h:140
int getLine() const
Return the source file line in which the exception occurred.
Definition: FMTException.h:234
const std::string & getDescription(bool p_french=false) const
Return the description of the exception thrown.
virtual ~FMTException()=default
Default virtual destructor for FMTException.
const std::string & getMessage() const
Return the message of the exception.
std::string getFile() const
Return the source file in which the exception occurred.
Definition: FMTException.h:225
void setPrintLevel(int p_level)
set the level of print and change the message
Core::FMTsection getSection() const
Return the section in which the exception occurred.
FMTlev getLevel() const
Return the level of the exception.
void setIgnore()
set a ignore message to the exception and turn the level to warning
FMTException(FMTexc p_exception, FMTlev p_level, Core::FMTsection p_section, const std::string &p_message, const std::string &p_method, const std::string &p_file, const int &p_line, const std::string &p_FrenchDescription, const std::string &p_EnglishDescription)
Construct a FMTException from an exception type, a section, a message and the location where it occur...
FMTexc getType() const
Return the type of exception held by this FMTException.
bool isFatal() const
return true if it is fatal
FMTException()
Default constructor for FMTException.
const char * what() const noexcept override
Override the what function of the base exception class returning the message string.
std::string getSrcInfo() const
Return a formatted string for the location of the exception.
FMTException(const FMTException &rhs)=default
Default copy constructor for FMTException.
FMTsection
Enumerator describing the sections of a Woodstock model.
Definition: FMTutility.h:32
Namespace for exceptions and exceptions handling (warnings and errors) thrown by FMT and all exceptio...
Definition: FMTAggregateRedefinition.h:11
FMTexc
Enumerator describing the exceptions thrown by FMT.
Definition: FMTException.h:45
@ FMTunhandlederror
Definition: FMTException.h:101
@ FMTinvalidlayer
Definition: FMTException.h:72
@ FMTinvalidoverview
Definition: FMTException.h:74
@ FMTcomma_replacement
Definition: FMTException.h:48
@ FMTinvalidband
Definition: FMTException.h:70
@ FMTunsupported_output
Definition: FMTException.h:80
@ FMTundefined_action
Definition: FMTException.h:77
@ FMTempty_schedules
Definition: FMTException.h:114
@ FMTinvalid_constraint
Definition: FMTException.h:93
@ FMTsame_transitiontargets
Definition: FMTException.h:124
@ FMTemptybound
Definition: FMTException.h:94
@ FMTaggregate_redefinition
Definition: FMTException.h:60
@ FMTunboundedperiod
Definition: FMTException.h:95
@ FMTfunctionfailed
Definition: FMTException.h:98
@ FMTWIN32_Error
Definition: FMTException.h:129
@ FMTnotlinegraph
Definition: FMTException.h:102
@ FMTinvalid_yield
Definition: FMTException.h:53
@ FMTboostgrapherror
Definition: FMTException.h:100
@ FMTyieldmodelprediction
Definition: FMTException.h:122
@ FMTmissinglicense
Definition: FMTException.h:97
@ FMTinvalid_transition
Definition: FMTException.h:55
@ FMTmissingrasterattribute
Definition: FMTException.h:75
@ FMTdeathwithlock
Definition: FMTException.h:120
@ FMTschemefailed
Definition: FMTException.h:116
@ FMTinvalid_action
Definition: FMTException.h:54
@ FMTinvalid_maskrange
Definition: FMTException.h:52
@ FMTgdal_constructor_error
Definition: FMTException.h:111
@ FMTunreachable_threshold
Definition: FMTException.h:131
@ FMTsourcetotarget_transition
Definition: FMTException.h:123
@ FMTunclosedforloop
Definition: FMTException.h:125
@ FMTempty_transition
Definition: FMTException.h:78
@ FMTthreadcrash
Definition: FMTException.h:126
@ FMTmskerror
Definition: FMTException.h:117
@ None
Definition: FMTException.h:46
@ FMTEmpty_OA
Definition: FMTException.h:128
@ FMTmissing_parameter
Definition: FMTException.h:119
@ FMTnonaddedconstraint
Definition: FMTException.h:96
@ FMToutput_missing_operator
Definition: FMTException.h:108
@ FMTcoinerror
Definition: FMTException.h:99
@ FMTunsupported_yield
Definition: FMTException.h:68
@ FMToutput_too_much_operator
Definition: FMTException.h:109
@ FMTundefined_aggregate_value
Definition: FMTException.h:63
@ FMTundefineddeathtransition
Definition: FMTException.h:85
@ FMTmissingfield
Definition: FMTException.h:73
@ FMTMSKnumerical_problem
Definition: FMTException.h:130
@ FMTmissingyield
Definition: FMTException.h:87
@ FMTundefined_attribute
Definition: FMTException.h:64
@ FMTinvalid_transition_case
Definition: FMTException.h:56
@ FMTempty_theme
Definition: FMTException.h:61
@ FMTinvaliddataset
Definition: FMTException.h:69
@ FMTinfeasibleconstraint
Definition: FMTException.h:106
@ FMToutofrangeyield
Definition: FMTException.h:127
@ FMTinvalid_path
Definition: FMTException.h:58
@ FMTinvalid_aggregate
Definition: FMTException.h:51
@ FMTfutur_types
Definition: FMTException.h:49
@ FMTpreexisting_yield
Definition: FMTException.h:67
@ FMTGDALerror
Definition: FMTException.h:104
@ FMTignore
Definition: FMTException.h:86
@ FMTthematic_output_diff
Definition: FMTException.h:107
@ FMTconstants_replacement
Definition: FMTException.h:47
@ FMTinvalid_number
Definition: FMTException.h:57
@ FMTwrong_partial
Definition: FMTException.h:66
@ FMTempty_aggregate
Definition: FMTException.h:62
@ FMTmaxnumberofexception
Definition: FMTException.h:132
@ FMTmissingdevelopment
Definition: FMTException.h:90
@ FMTinvaliddriver
Definition: FMTException.h:81
@ FMTtheme_redefinition
Definition: FMTException.h:59
@ FMTreplanningwarning
Definition: FMTException.h:121
@ FMTunsupported_objective
Definition: FMTException.h:92
@ FMTattribute_redefinition
Definition: FMTException.h:88
@ FMTmissingobjective
Definition: FMTException.h:91
@ FMTundefined_output
Definition: FMTException.h:79
@ FMTinvalid_geometry
Definition: FMTException.h:112
@ FMTundefinedoutput_attribute
Definition: FMTException.h:113
@ FMTunsupported_transition
Definition: FMTException.h:76
@ FMTempty_action
Definition: FMTException.h:65
@ FMTmissing_scenarios
Definition: FMTException.h:115
@ FMTinvalid_theme
Definition: FMTException.h:50
@ FMTundefined_constant
Definition: FMTException.h:89
@ FMTinvalidyield_number
Definition: FMTException.h:110
@ FMTGDALwarning
Definition: FMTException.h:105
@ FMTrangeerror
Definition: FMTException.h:103
@ FMTleakingtransition
Definition: FMTException.h:83
@ FMTinvalidAandT
Definition: FMTException.h:82
@ FMTundefineddeathaction
Definition: FMTException.h:84
@ FMTinvalidrasterblock
Definition: FMTException.h:71
@ FMToveridedyield
Definition: FMTException.h:118
FMTlev
Enumerator describing the kind of exception thrown by FMT.
Definition: FMTException.h:32
@ FMT_range
Definition: FMTException.h:37
@ FMT_logic
Definition: FMTException.h:36
@ FMT_None
Definition: FMTException.h:33
@ FMT_Debug
Definition: FMTException.h:34
@ FMT_Warning
Definition: FMTException.h:35