Ipopt::IpoptException Class Reference

This is the base class for all exceptions. More...

#include <IpException.hpp>

Collaboration diagram for Ipopt::IpoptException:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void ReportException (const Journalist &jnlst, EJournalLevel level=J_ERROR) const
 Method to report the exception to a journalist.
const std::string & Message () const
Constructors/Destructors



 IpoptException (std::string msg, std::string file_name, Index line_number, std::string type="IpoptException")
 Constructor.
 IpoptException (const IpoptException &copy)
 Copy Constructor.
virtual ~IpoptException ()
 Default destructor.

Private Member Functions

Default Compiler Generated Methods

(Hidden to avoid implicit creation/calling).

These methods are not implemented and we do not want the compiler to implement them for us, so we declare them private and do not define them. This ensures that they will not be implicitly created/called.



 IpoptException ()
 Default Constructor.
void operator= (const IpoptException &)
 Overloaded Equals Operator.

Private Attributes

std::string msg_
std::string file_name_
Index line_number_
std::string type_

Detailed Description

This is the base class for all exceptions.

The easiest way to use this class is by means of the following macros:


     DECLARE_STD_EXCEPTION(ExceptionType);
     

This macro defines a new class with the name ExceptionType, inherited from the base class IpoptException. After this, exceptions of this type can be thrown using


     THROW_EXCEPTION(ExceptionType, Message);
     

where Message is a std::string with a message that gives an indication of what caused the exception. Exceptions can also be thrown using the macro


     ASSERT_EXCEPTION(Condition, ExceptionType, Message);
     

where Conditions is an expression. If Condition evaluates to false, then the exception of the type ExceptionType is thrown with Message.

When an exception is caught, the method ReportException can be used to write the information about the exception to the Journalist, using the level J_ERROR and the category J_MAIN.

Definition at line 57 of file IpException.hpp.


Constructor & Destructor Documentation

Ipopt::IpoptException::IpoptException ( std::string  msg,
std::string  file_name,
Index  line_number,
std::string  type = "IpoptException" 
) [inline]

Constructor.

Definition at line 63 of file IpException.hpp.

Ipopt::IpoptException::IpoptException ( const IpoptException copy  )  [inline]

Copy Constructor.

Definition at line 72 of file IpException.hpp.

virtual Ipopt::IpoptException::~IpoptException (  )  [inline, virtual]

Default destructor.

Definition at line 81 of file IpException.hpp.

Ipopt::IpoptException::IpoptException (  )  [private]

Default Constructor.


Member Function Documentation

void Ipopt::IpoptException::ReportException ( const Journalist jnlst,
EJournalLevel  level = J_ERROR 
) const [inline]

Method to report the exception to a journalist.

Definition at line 86 of file IpException.hpp.

const std::string& Ipopt::IpoptException::Message (  )  const [inline]

Definition at line 94 of file IpException.hpp.

void Ipopt::IpoptException::operator= ( const IpoptException  )  [private]

Overloaded Equals Operator.


Member Data Documentation

std::string Ipopt::IpoptException::msg_ [private]

Definition at line 115 of file IpException.hpp.

std::string Ipopt::IpoptException::file_name_ [private]

Definition at line 116 of file IpException.hpp.

Definition at line 117 of file IpException.hpp.

std::string Ipopt::IpoptException::type_ [private]

Definition at line 118 of file IpException.hpp.


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

Generated on 15 Mar 2015 for Coin-All by  doxygen 1.6.1