FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTExceptionFactory.h
Go to the documentation of this file.
1#ifndef FMTExceptionFactory_included
2#define FMTExceptionFactory_included
3#include "FMTException.h"
4#include <boost/graph/exception.hpp>
5#include <memory>
6#include <exception>
7
8#if defined FMTWITHOSI
9
10class CoinError;
11
12#endif
13
14
16namespace Exception
17{
18#if defined _MSC_VER
19 class FMTSeException;
20#endif
21
22 // DocString: FMTExceptionFactory
33 {
34 public:
35
36 // DocString: FMTExceptionFactory::create
53 static std::unique_ptr<FMTException> create(
54 FMTexc p_exception,
55 Core::FMTsection p_section,
56 const std::string& p_message,
57 const std::string& p_method,
58 const std::string& p_file,
59 int p_line);
60
61#if defined FMTWITHOSI
62
63 // DocString: FMTExceptionFactory::createCoinException
71 static std::unique_ptr<FMTException> createCoinException(
72 const CoinError& p_CoinException);
73
74#endif
75
76 // DocString: FMTExceptionFactory::createBoostGraphException
84 static std::unique_ptr<FMTException> createBoostGraphException(
85 const boost::bad_graph& p_exception);
86
87#if defined _MSC_VER
88
89 // DocString: FMTExceptionFactory::createSeException
97 static std::unique_ptr<FMTException> createSeException(
98 const FMTSeException& p_SeException);
99
100#endif
101
102 // DocString: FMTExceptionFactory::createUnhandledException
113 static std::unique_ptr<FMTException> createUnhandledException(
114 const std::exception& p_exception);
115 };
116}
117
118#endif
Factory class used to create FMT exception objects.
Definition: FMTExceptionFactory.h:33
static std::unique_ptr< FMTException > createCoinException(const CoinError &p_CoinException)
Creates an FMTCoinError exception from a COIN-OR exception.
static std::unique_ptr< FMTException > create(FMTexc p_exception, Core::FMTsection p_section, const std::string &p_message, const std::string &p_method, const std::string &p_file, int p_line)
Creates a concrete FMTException instance corresponding to the specified FMT exception type.
static std::unique_ptr< FMTException > createUnhandledException(const std::exception &p_exception)
Creates an FMTUnhandledError exception from a standard exception.
static std::unique_ptr< FMTException > createBoostGraphException(const boost::bad_graph &p_exception)
Creates an FMTBoostGraphError exception from a Boost Graph exception.
Exception representing a structured exception (SE) caught on Windows.
Definition: FMTSeException.h:27
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