Base exception class for solving errors. More...
#include <roboptim/core/solver-error.hh>
Public Member Functions | |
SolverError (const std::string &arg) | |
Instantiate an error from an error message. | |
SolverError (const std::string &arg, const Result &res) | |
Instantiate an error from an error message. | |
SolverError (const SolverError &error) | |
Copy constructor. | |
~SolverError () throw () | |
Trivial destructor. | |
virtual std::ostream & | print (std::ostream &) const |
Display the error on the specified output stream. | |
const boost::optional< Result > & | lastState () const |
Retrieve the (optional) last state of the solver. | |
boost::optional< Result > & | lastState () |
Retrieve the (optional) last state of the solver. |
Base exception class for solving errors.
All other exceptions classes concerning the optimization process should inherits this class.
roboptim::SolverError::SolverError | ( | const std::string & | arg | ) | [explicit] |
Instantiate an error from an error message.
arg | error message. |
roboptim::SolverError::SolverError | ( | const std::string & | arg, |
const Result & | res | ||
) |
Instantiate an error from an error message.
arg | error message. |
res | last state of the solver. |
roboptim::SolverError::SolverError | ( | const SolverError & | error | ) |
Copy constructor.
error | other error to copy. |
roboptim::SolverError::~SolverError | ( | ) | throw () |
Trivial destructor.
const boost::optional< Result > & roboptim::SolverError::lastState | ( | ) | const |
Retrieve the (optional) last state of the solver.
boost::optional< Result > & roboptim::SolverError::lastState | ( | ) |
Retrieve the (optional) last state of the solver.
std::ostream & roboptim::SolverError::print | ( | std::ostream & | o | ) | const [virtual] |
Display the error on the specified output stream.
o | output stream used for display |
Reimplemented in roboptim::SolverWarning.
References roboptim::fg::fail(), and roboptim::fg::reset().
Referenced by roboptim::operator<<().