FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
Exception::FMTquietexceptionhandler Class Referencefinal

#include <FMTquietexceptionhandler.hpp>

Inheritance diagram for Exception::FMTquietexceptionhandler:
[legend]
Collaboration diagram for Exception::FMTquietexceptionhandler:
[legend]

Public Member Functions

 FMTquietexceptionhandler ()
 
 ~FMTquietexceptionhandler ()=default
 
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
 
FMTexceptionhandlergetCPLdata () override
 
void handelCPLerror (int eErrClass, int nError, const char *pszErrorMsg) override
 
- Public Member Functions inherited from Exception::FMTexceptionhandler
void checksignals () const
 
 FMTexceptionhandler ()
 
virtual ~FMTexceptionhandler ()=default
 
 FMTexceptionhandler (const FMTexceptionhandler &rhs)
 
 FMTexceptionhandler (const std::shared_ptr< Logging::FMTlogger > &logger)
 
void passinlogger (const std::shared_ptr< Logging::FMTlogger > &logger)
 
virtual FMTexceptionhandlergetCPLdata ()
 
virtual void handelCPLerror (int eErrClass, int nError, const char *pszErrorMsg)
 
FMTexceptionhandleroperator= (const FMTexceptionhandler &rhs)
 
void throw_nested (const std::exception &texception, int &level, bool rethrow=true)
 
virtual void printexceptions (std::string text, const std::string &method, const int &line, const std::string &fil, Core::FMTsection lsection=Core::FMTsection::Empty)
 
virtual 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)
 
virtual FMTexception raisefromcatch (std::string text, const std::string &method, const int &line, const std::string &file, Core::FMTsection lsection=Core::FMTsection::Empty)
 
void raisefromthreadcatch (std::string text, const std::string &method, const int &line, const std::string &file, Core::FMTsection lsection=Core::FMTsection::Empty)
 
void reraiseifthreadcrash ()
 
void enablenestedexceptions ()
 
void disablenestedexceptions ()
 
void seterrorstowarnings (const std::vector< Exception::FMTexc > &errors)
 
void setmaxwarningsbeforesilenced (const size_t &maxwarningcount)
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Public Attributes inherited from Exception::FMTexceptionhandler
std::unordered_map< int, size_t > _specificwarningcount
 Keeps count of the number of each type of warning thrown.
 
- Protected Member Functions inherited from Exception::FMTexceptionhandler
std::string updatestatus (const FMTexc lexception, const std::string message)
 
bool needtorethrow () const
 
bool ismainthread () const
 
bool isthrowedonthread () const
 
bool isthisthreadthrowed () const
 
void registerworkerthread ()
 
bool isthreadregistered () const
 
void gutsofprintexceptions (std::string text, const std::string &method, const int &line, const std::string &fil, int &levelreference, Core::FMTsection lsection=Core::FMTsection::Empty, bool logfirstlevel=true)
 
void gutsofexceptionlog (const std::exception &texception, const int &level)
 
- Protected Attributes inherited from Exception::FMTexceptionhandler
FMTlev _level
 This is the level of the last FMTexception thrown by the FMTexceptionhandler.
 
FMTexc _exception
 This is the type of the last FMTexception thrown by the FMTexceptionhandler.
 
int _errorcount
 Keeps count of the number of error thrown.
 
int _warningcount
 Keeps count of the number of warning thrown.
 
size_t maxwarningsbeforesilenced
 Number of time that the handler throw a certain warning before stop throwing it.
 
std::shared_ptr< Logging::FMTlogger_logger
 pointer to the logger used to print the warning / error.
 
bool usenestedexceptions
 If usenested = true then the handler will throw nested exceptions.
 
boost::recursive_mutex mtx
 Mutex for multi-threading.
 
std::vector< Exception::FMTexcerrorstowarnings
 If an error is in this list it's going to processed like a warning.
 
std::set< boost::thread::id > registered_threads
 This is the level of the last FMTexception thrown by the FMTexceptionhandler.
 
std::exception_ptr threadcrashexception
 The exception throwed by the faulty thread...
 
- Static Protected Attributes inherited from Exception::FMTexceptionhandler
static boost::thread::id mainthreadid
 Main thread id.
 
static boost::thread::id crashedthreadid
 The thread id of the crashed thread.
 

Detailed Description

The FMTquietexceptionhandler is derived from the FMTexceptionhandler base class. This class is a silent class it does not throw any kind of logging but throw errors and no warnings.

Constructor & Destructor Documentation

◆ FMTquietexceptionhandler()

Exception::FMTquietexceptionhandler::FMTquietexceptionhandler ( )

Default constructor for FMTquietexceptionhandler

◆ ~FMTquietexceptionhandler()

Exception::FMTquietexceptionhandler::~FMTquietexceptionhandler ( )
default

Default destructor for FMTquietexceptionhandler

Member Function Documentation

◆ getCPLdata()

FMTexceptionhandler * Exception::FMTquietexceptionhandler::getCPLdata ( )
overridevirtual

Used in the handelCPLerror called back by GDAL function reutnr a abstract copy of itselft. See getCPLdata of FMTexceptionhandler class.

Reimplemented from Exception::FMTexceptionhandler.

◆ handelCPLerror()

void Exception::FMTquietexceptionhandler::handelCPLerror ( int  eErrClass,
int  nError,
const char *  pszErrorMsg 
)
overridevirtual

Used has call back in gdal. See handelCPLerror of FMTexceptionhandler class.

Reimplemented from Exception::FMTexceptionhandler.

◆ raise()

FMTexception Exception::FMTquietexceptionhandler::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 
)
overridevirtual

The function overide the base class raise function. See raise function of FMTexceptionhandler class.

Reimplemented from Exception::FMTexceptionhandler.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Serialize function is for serialization, used to do multiprocessing across multiple cpus (pickle in Pyhton)


The documentation for this class was generated from the following file: