MAiNGO
maingo::MAiNGOException Class Reference

This class defines the exceptions thrown by MAiNGO. More...

#include <MAiNGOException.h>

Inheritance diagram for maingo::MAiNGOException:

Public Member Functions

 MAiNGOException ()=delete
 
 MAiNGOException (const MAiNGOException &)=default
 
 MAiNGOException (MAiNGOException &&)=default
 
MAiNGOExceptionoperator= (const MAiNGOException &)=default
 
MAiNGOExceptionoperator= (MAiNGOException &&)=default
 
virtual ~MAiNGOException ()=default
 
 MAiNGOException (const std::string &errorMessage)
 
 MAiNGOException (const std::string &errorMessage, const babBase::BabNode &nodeThatErrorOccurredIn)
 
 MAiNGOException (const std::string &errorMessage, const std::exception &originalException)
 
 MAiNGOException (const std::string &errorMessage, const std::exception &originalException, const babBase::BabNode &nodeThatErrorOccurredIn)
 
const char * what () const noexcept override
 

Private Member Functions

void _construct_complete_error_message (const std::string &errorMessage, const std::exception *originalException, const babBase::BabNode *nodeThatErrorOccurredIn)
 
void _append_current_error_message_to_message (const std::string &currentErrorMessage, std::ostringstream &completeErrorMessage)
 
void _append_original_exception_info_to_message (const std::exception *originalException, std::ostringstream &completeErrorMessage)
 
void _append_node_info_to_message (const babBase::BabNode *nodeThatErrorOccurredIn, std::ostringstream &completeErrorMessage)
 

Private Attributes

std::string _errorMessage {""}
 

Detailed Description

This class defines the exceptions thrown by MAiNGO.

The class contains different constructors that allow incorporating information about the error. The minimum requirement is an error message. Additionally, information can be given about a branch-and-bound node that the error occurred in, or information on the original exception can be included in case the MAiNGOException is thrown in response to another type of exception.

Constructor & Destructor Documentation

◆ MAiNGOException() [1/7]

maingo::MAiNGOException::MAiNGOException ( )
delete

◆ MAiNGOException() [2/7]

maingo::MAiNGOException::MAiNGOException ( const MAiNGOException )
default

◆ MAiNGOException() [3/7]

maingo::MAiNGOException::MAiNGOException ( MAiNGOException &&  )
default

◆ ~MAiNGOException()

virtual maingo::MAiNGOException::~MAiNGOException ( )
virtualdefault

◆ MAiNGOException() [4/7]

maingo::MAiNGOException::MAiNGOException ( const std::string &  errorMessage)
inlineexplicit

◆ MAiNGOException() [5/7]

maingo::MAiNGOException::MAiNGOException ( const std::string &  errorMessage,
const babBase::BabNode nodeThatErrorOccurredIn 
)
inline

◆ MAiNGOException() [6/7]

maingo::MAiNGOException::MAiNGOException ( const std::string &  errorMessage,
const std::exception &  originalException 
)
inline

◆ MAiNGOException() [7/7]

maingo::MAiNGOException::MAiNGOException ( const std::string &  errorMessage,
const std::exception &  originalException,
const babBase::BabNode nodeThatErrorOccurredIn 
)
inline

Member Function Documentation

◆ _append_current_error_message_to_message()

void maingo::MAiNGOException::_append_current_error_message_to_message ( const std::string &  currentErrorMessage,
std::ostringstream &  completeErrorMessage 
)
inlineprivate

◆ _append_node_info_to_message()

void maingo::MAiNGOException::_append_node_info_to_message ( const babBase::BabNode nodeThatErrorOccurredIn,
std::ostringstream &  completeErrorMessage 
)
inlineprivate

◆ _append_original_exception_info_to_message()

void maingo::MAiNGOException::_append_original_exception_info_to_message ( const std::exception *  originalException,
std::ostringstream &  completeErrorMessage 
)
inlineprivate

◆ _construct_complete_error_message()

void maingo::MAiNGOException::_construct_complete_error_message ( const std::string &  errorMessage,
const std::exception *  originalException,
const babBase::BabNode nodeThatErrorOccurredIn 
)
inlineprivate

◆ operator=() [1/2]

MAiNGOException& maingo::MAiNGOException::operator= ( const MAiNGOException )
default

◆ operator=() [2/2]

MAiNGOException& maingo::MAiNGOException::operator= ( MAiNGOException &&  )
default

◆ what()

const char* maingo::MAiNGOException::what ( ) const
inlineoverridenoexcept

Member Data Documentation

◆ _errorMessage

std::string maingo::MAiNGOException::_errorMessage {""}
private

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