9#ifndef __IPEXCEPTION_HPP__
10#define __IPEXCEPTION_HPP__
20#if defined(__GNUC__) && __GNUC__ >= 4
21#define IPOPTEXCEPTION_EXPORT __attribute__((__visibility__("default")))
23#define IPOPTEXCEPTION_EXPORT IPOPTLIB_EXPORT
73 const std::string& msg,
74 const std::string& file_name,
76 const std::string& type =
"IpoptException"
141#define THROW_EXCEPTION(__except_type, __msg) \
142 throw __except_type( (__msg), (__FILE__), (__LINE__) );
144#define ASSERT_EXCEPTION(__condition, __except_type, __msg) \
145 if (! (__condition) ) { \
146 std::string newmsg = #__condition; \
147 newmsg += " evaluated false: "; \
149 throw __except_type( (newmsg), (__FILE__), (__LINE__) ); \
152#define DECLARE_STD_EXCEPTION(__except_type) \
153 class IPOPTEXCEPTION_EXPORT __except_type : public Ipopt::IpoptException \
156 __except_type(const std::string& msg, const std::string& fname, Ipopt::Index line) \
157 : Ipopt::IpoptException(msg,fname,line, #__except_type) {} \
158 __except_type(const __except_type& copy) \
159 : Ipopt::IpoptException(copy) {} \
162 void operator=(const __except_type&); \
#define IPOPTEXCEPTION_EXPORT
#define IPOPT_INDEX_FORMAT
Format specifier to use for ipindex in printf-format strings.
IpoptException(const std::string &msg, const std::string &file_name, Index line_number, const std::string &type="IpoptException")
Constructor.
virtual ~IpoptException()
Default destructor.
const std::string & Message() const
void ReportException(const Journalist &jnlst, EJournalLevel level=J_ERROR) const
Method to report the exception to a journalist.
IpoptException(const IpoptException ©)
Copy Constructor.
void operator=(const IpoptException &)
Default Assignment Operator.
IpoptException()
Default Constructor.
Class responsible for all message output.
virtual void Printf(EJournalLevel level, EJournalCategory category, const char *format,...) const
Method to print a formatted string.
ipindex Index
Type of all indices of vectors, matrices etc.
EJournalLevel
Print Level Enum.