FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTError.h
Go to the documentation of this file.
1/*
2Copyright (c) 2019 Gouvernement du Québec
3
4SPDX-License-Identifier: LiLiQ-R-1.1
5License-Filename: LICENSES/EN/LiLiQ-R11unicode.txt
6*/
7
8#ifndef FMTerror_Hm_included
9#define FMTerror_Hm_included
10
11#include "FMTException.h"
12#include <string>
13#include <boost/serialization/serialization.hpp>
14
15#if defined FMTWITHOSI
16 class CoinError;
17#endif
18
19#include <boost/graph/exception.hpp>
20#include <boost/serialization/nvp.hpp>
21#include <boost/serialization/base_object.hpp>
22
23
24namespace Exception
25 {
26 // DocString: FMTError
32 {
33 public:
34 // DocString: ~FMTError()
38 ~FMTError() = default;
39 // DocString: FMTError::operator=
44 FMTError& operator=(const FMTError&) = default;
45 // DocString: FMTError()
50 // DocSt*ing: FMTError(FMTexc,FMTlev,Core::*MTsection,const std::string&,const*std::string&,const std::string&,co*st int&,const std::string&,const s*d::string&)
63 FMTError(FMTexc p_exception, FMTlev p_level, Core::FMTsection p_section, const std::string& p_message,
64 const std::string& p_method, const std::string& p_file, const int& p_line,
65 const std::string& p_FrenchDescription, const std::string& p_EnglishDescription);
66 private:
67 // DocString: FMTError::serialize
74 friend class boost::serialization::access;
75 template<class Archive>
76 void serialize(Archive& ar, const unsigned int version)
77 {
78 ar& boost::serialization::make_nvp("exception", boost::serialization::base_object<FMTException>(*this));
79 }
80
81 };
82 }
83#endif
84
#define FMTEXPORT
Definition: FMTutility.h:125
Exception class derived from FMTException for errors thrown in FMT.
Definition: FMTError.h:32
FMTError(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 FMTError from an exception type, a section, a message and the location where it occurred.
FMTError()
Default constructor for FMTError.
~FMTError()=default
Default destructor for FMTError.
FMTError & operator=(const FMTError &)=default
Default copy assignment operator for FMTError.
Base exception class for FMT holding the type, section and message of a given exception.
Definition: FMTException.h:140
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
FMTlev
Enumerator describing the kind of exception thrown by FMT.
Definition: FMTException.h:32