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

Casadi exception class. More...

#include <exception.hpp>

Detailed Description

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

Extra doc: https://github.com/casadi/casadi/wiki/L_7u

Definition at line 77 of file 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...
 
 ~CasadiException () throw ()
 Destructor. More...
 
const char * what () const override throw ()
 Display error. More...
 

Protected Attributes

std::string msg_
 

Constructor & Destructor Documentation

◆ CasadiException() [1/2]

casadi::CasadiException::CasadiException ( )
inline

Definition at line 80 of file exception.hpp.

◆ CasadiException() [2/2]

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

Definition at line 84 of file exception.hpp.

◆ ~CasadiException()

casadi::CasadiException::~CasadiException ( )
throw (
)
inline

Definition at line 87 of file exception.hpp.

Member Function Documentation

◆ what()

const char* casadi::CasadiException::what ( ) const
throw (
)
inlineoverride

Definition at line 90 of file exception.hpp.

Member Data Documentation

◆ msg_

std::string casadi::CasadiException::msg_
protected

Definition at line 95 of file exception.hpp.


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