FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTdefaultexceptionhandler.hpp
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 FMTdefaultexceptionhandler_H_INCLUDED
9#define FMTdefaultexceptionhandler_H_INCLUDED
10
12#include "FMTexception.hpp"
13#include <string>
14
15namespace Exception
16{
17// DocString: FMTdefaultexceptionhandler
23 {
24 // DocString: FMTdefaultexceptionhandler::serialize
28 friend class boost::serialization::access;
29 template<class Archive>
30 void serialize(Archive& ar, const unsigned int version)
31 {
32 ar & boost::serialization::make_nvp("FMTexceptionhandler", boost::serialization::base_object<FMTexceptionhandler>(*this));
33 }
34 public:
35 // DocString: FMTdefaultexceptionhandler()
40 // DocString: FMTdefaultexceptionhandler(const std::shared_ptr<Logging::FMTlogger>&)
44 FMTdefaultexceptionhandler(const std::shared_ptr<Logging::FMTlogger>& logger);
45 // DocString: ~FMTdefaultexceptionhandler()
50 // DocString: FMTdefaultexceptionhandler::raise
55 FMTexception raise(FMTexc lexception, std::string text,
56 const std::string& method, const int& line, const std::string& file,
57 Core::FMTsection lsection = Core::FMTsection::Empty, bool throwit = true) override;
58
59 // DocString: FMTdefaultexceptionhandler::getCPLdata
65 // DocString: FMTdefaultexceptionhandler::handelCPLerror
66 #if defined FMTWITHGDAL
71 void handelCPLerror(int eErrClass, int nError, const char * pszErrorMsg) override;
72 #endif
73 };
74}
75
76BOOST_CLASS_EXPORT_KEY(Exception::FMTdefaultexceptionhandler)
77
78#endif
79
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTdefaultexceptionhandler.hpp:23
FMTexceptionhandler * getCPLdata() override
FMTdefaultexceptionhandler(const std::shared_ptr< Logging::FMTlogger > &logger)
void handelCPLerror(int eErrClass, int nError, const char *pszErrorMsg) override
FMTexception raise(FMTexc lexception, std::string text, const std::string &method, const int &line, const std::string &file, Core::FMTsection lsection=Core::FMTsection::Empty, bool throwit=true) override
Definition: FMTexception.hpp:134
Definition: FMTexceptionhandler.hpp:32
FMTsection
Definition: FMTutility.hpp:23
@ Empty
Definition: FMTutility.hpp:35
Namespace for exceptions and exceptions handling (warnings and errors) thrown by FMT and all exceptio...
Definition: FMTcplhandler.hpp:16
FMTexc
Definition: FMTexception.hpp:42