roboptim::SolverError Class Reference

Base exception class for solving errors. More...

#include <roboptim/core/solver-error.hh>

Inheritance diagram for roboptim::SolverError:
Collaboration diagram for roboptim::SolverError:

List of all members.

Public Member Functions

 SolverError (const std::string &arg) throw ()
 Instantiate an error from an error message.
 SolverError (const std::string &arg, const Result &res) throw ()
 Instantiate an error from an error message.
 SolverError (const SolverError &error) throw ()
 Copy constructor.
 ~SolverError () throw ()
 Trivial destructor.
virtual std::ostream & print (std::ostream &) const throw ()
 Display the error on the specified output stream.
const boost::optional< Result > & lastState () const throw ()
 Retrieve the (optional) last state of the solver.
boost::optional< Result > & lastState () throw ()
 Retrieve the (optional) last state of the solver.

Detailed Description

Base exception class for solving errors.

All other exceptions classes concerning the optimization process should inherits this class.


Constructor & Destructor Documentation

roboptim::SolverError::SolverError ( const std::string &  arg) throw () [explicit]

Instantiate an error from an error message.

Parameters:
argerror message.
roboptim::SolverError::SolverError ( const std::string &  arg,
const Result res 
) throw ()

Instantiate an error from an error message.

Parameters:
argerror message.
reslast state of the solver.
roboptim::SolverError::SolverError ( const SolverError error) throw ()

Copy constructor.

Parameters:
errorother error to copy.

Trivial destructor.


Member Function Documentation

const boost::optional< Result > & roboptim::SolverError::lastState ( ) const throw ()

Retrieve the (optional) last state of the solver.

Returns:
last state of the solver.
boost::optional< Result > & roboptim::SolverError::lastState ( ) throw ()

Retrieve the (optional) last state of the solver.

Returns:
last state of the solver.
std::ostream & roboptim::SolverError::print ( std::ostream &  o) const throw () [virtual]

Display the error on the specified output stream.

Parameters:
ooutput stream used for display
Returns:
output stream

Reimplemented in roboptim::SolverWarning.

References roboptim::fg::fail(), and roboptim::fg::reset().

Referenced by roboptim::operator<<().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines