solver  1.0
Public Member Functions | Protected Attributes | List of all members
SolverException Class Reference

A general exception of the program. More...

#include <Exceptions.h>

+ Inheritance diagram for SolverException:
+ Collaboration diagram for SolverException:

Public Member Functions

 SolverException (const std::string &caller, const std::string &msg)
 Constructs the exception, it comprises building of the error string and vector of lines. More...
 
virtual const char * what () const throw ()
 Virtual method returns the error message without an indentation.
 
virtual std::string whatIndented (uint32_t level=0) const throw ()
 Virtual function returning the formatted error message. More...
 
virtual ~SolverException () throw ()
 Virtual destructor is mandatory due to the polymorphism.
 

Protected Attributes

std::string mWhatStr
 The formated error message without an indentation.
 
std::vector< std::string > mWhat
 Individual lines of the error message.
 

Detailed Description

A general exception of the program.

A general exception of the program supporting formatted output. More specialized exceptions are derived from this class.

See also
InvalidDatasetFile, InvalidArgument, ILPSolverException, NoFeasibleSolutionExists, EmptySolutionPool

Definition at line 58 of file Exceptions.h.

Constructor & Destructor Documentation

SolverException::SolverException ( const std::string &  caller,
const std::string &  msg 
)
inline

Constructs the exception, it comprises building of the error string and vector of lines.

Parameters
callerString representation of the method in which this exception was thrown.
msgError message. Messages with multiple lines are supported.
Note
To ease the filling of the caller, an ugly but incredibly useful macro caller() is available.

Definition at line 66 of file Exceptions.h.

Member Function Documentation

virtual std::string SolverException::whatIndented ( uint32_t  level = 0) const
throw (
)
inlinevirtual

Virtual function returning the formatted error message.

Parameters
levelThe number of prepended tabulators.
Returns
Formated string with the error message.

Definition at line 80 of file Exceptions.h.


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