![]() |
FMT 1.2.0
Forest management tools for forest planning
|
Factory class used to create FMT exception objects. More...
#include <FMTExceptionFactory.h>
Static Public Member Functions | |
| 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 > | createCoinException (const CoinError &p_CoinException) |
| Creates an FMTCoinError exception from a COIN-OR exception. | |
| static std::unique_ptr< FMTException > | createBoostGraphException (const boost::bad_graph &p_exception) |
| Creates an FMTBoostGraphError exception from a Boost Graph exception. | |
| static std::unique_ptr< FMTException > | createUnhandledException (const std::exception &p_exception) |
| Creates an FMTUnhandledError exception from a standard exception. | |
Factory class used to create FMT exception objects.
This factory centralizes the creation of all FMTException-derived objects. It provides methods for constructing exceptions from FMT exception identifiers as well as wrappers for exceptions thrown by external libraries such as Boost Graph, COIN-OR and platform-specific system exceptions.
|
static |
Creates a concrete FMTException instance corresponding to the specified FMT exception type.
The returned object is an instance of the FMTException-derived class associated with the supplied exception identifier.
| [in] | p_exception | Type of exception to create. |
| [in] | p_section | FMT section in which the exception occurred. |
| [in] | p_message | Exception message. |
| [in] | p_method | Method in which the exception occurred. |
| [in] | p_file | Source file in which the exception occurred. |
| [in] | p_line | Source file line at which the exception occurred. |
|
static |
Creates an FMTBoostGraphError exception from a Boost Graph exception.
| [in] | p_exception | The Boost Graph exception to wrap. |
|
static |
Creates an FMTCoinError exception from a COIN-OR exception.
| [in] | p_CoinException | The COIN-OR exception to wrap. |
|
static |
Creates an FMTUnhandledError exception from a standard exception.
This method is typically used to convert exceptions originating outside of the FMT exception hierarchy into a managed FMT exception.
| [in] | p_exception | The standard exception to wrap. |