98 std::ostringstream message;
101 if (
typeid(*e).name() !=
typeid(*this).name()) {
102 message <<
"Original std::exception: " <<
typeid(*e).name() <<
": " << std::endl
105 message << e->what();
110 <<
"Exception was thrown while processing node no. " << node->
get_ID() <<
":" << std::endl;
111 for (
unsigned int i = 0; i < lowerVarBounds.size(); i++) {
112 message <<
" x(" << i <<
"): " << std::setprecision(16) << lowerVarBounds[i] <<
":" << upperVarBounds[i] << std::endl;
115 _msg = message.str();
124 const char*
what() const noexcept
int get_ID() const
Function for querying the node ID.
Definition: babNode.h:100
Class representing a node in the Branch-and-Bound tree.
Definition: babNode.h:35
namespace holding all essentials of the babBase submodule
Definition: babBrancher.h:40
BranchAndBoundBaseException(const std::string &arg, const babBase::BabNode &node)
Constructor used for forwarding.
Definition: babException.h:61
BranchAndBoundBaseException(const std::string &arg, const std::exception *e, const babBase::BabNode *node)
Constructor used printing a BranchAndBoundBase Exception.
Definition: babException.h:96
BranchAndBoundBaseException(const std::string &arg, const std::exception &e)
Constructor used for forwarding.
Definition: babException.h:72
std::vector< double > get_lower_bounds() const
Function for querying the lower bounds on the optimization variables within this node.
Definition: babNode.h:90
BranchAndBoundBaseException(const std::string &arg)
Constructor used for forwarding.
Definition: babException.h:50
BranchAndBoundBaseException(const std::string &arg, const std::exception &e, const babBase::BabNode &node)
Constructor used for forwarding.
Definition: babException.h:84
This class defines the exceptions thrown by BranchAndBoundBase.
Definition: babException.h:38
std::string _msg
Definition: babException.h:41
const char * what() const noexcept
Function to return the error message.
Definition: babException.h:124
std::vector< double > get_upper_bounds() const
Function for querying the upper bounds on the optimization variables within this node.
Definition: babNode.h:95
BranchAndBoundBaseException()