Public Member Functions | Protected Attributes | List of all members
CasADi::CasadiException Class Reference

Casadi exception class. More...

#include <casadi_exception.hpp>

Inheritance diagram for CasADi::CasadiException:
Inheritance graph
[legend]

Public Member Functions

 CasadiException ()
 Default constructor. More...
 
 CasadiException (const std::string &msg)
 Form message string. More...
 
CasadiExceptionoperator<< (const std::string &msg)
 Append a message. More...
 
CasadiExceptionoperator<< (const std::exception &ex)
 Append an exception. More...
 
virtual const char * what () const throw ()
 Display error. More...
 
 ~CasadiException () throw ()
 Destructor. More...
 

Protected Attributes

std::string msg_
 

Detailed Description

Casadi exception class.

Author
Joel Andersson
Date
2010 Example for simple exception throwing:
throw CasadiException("This is a nasty error");
Example for exception chaining:
try {
throw CasadiException("This is a nasty error");
catch (CasadiException &e) {
throw CasadiException("Serious error.") << e;
}

Definition at line 50 of file casadi_exception.hpp.

Constructor & Destructor Documentation

CasADi::CasadiException::CasadiException ( )
inline

Default constructor.

Definition at line 53 of file casadi_exception.hpp.

CasADi::CasadiException::CasadiException ( const std::string &  msg)
inlineexplicit

Form message string.

Definition at line 57 of file casadi_exception.hpp.

CasADi::CasadiException::~CasadiException ( )
throw (
)
inline

Destructor.

Definition at line 60 of file casadi_exception.hpp.

Member Function Documentation

CasadiException& CasADi::CasadiException::operator<< ( const std::string &  msg)
inline

Append a message.

Definition at line 68 of file casadi_exception.hpp.

CasadiException& CasADi::CasadiException::operator<< ( const std::exception &  ex)
inline

Append an exception.

Definition at line 74 of file casadi_exception.hpp.

virtual const char* CasADi::CasadiException::what ( ) const
throw (
)
inlinevirtual

Display error.

Definition at line 63 of file casadi_exception.hpp.

Member Data Documentation

std::string CasADi::CasadiException::msg_
protected

Definition at line 81 of file casadi_exception.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:27