13 #ifndef HPP_UTIL_EXCEPTION_HH 14 # define HPP_UTIL_EXCEPTION_HH 19 # include <hpp/util/config.hh> 26 class HPP_UTIL_DLLAPI
Exception :
public std::exception
30 const std::string& file,
31 unsigned line)
throw ();
36 virtual const char* what ()
const throw ();
42 virtual std::ostream& print (std::ostream& o)
const throw ();
54 HPP_UTIL_DLLAPI std::ostream&
60 # define HPP_THROW_EXCEPTION_(MSG) \ 61 throw ::hpp::Exception (MSG, __FILE__, __LINE__) 64 # define HPP_THROW_EXCEPTION(TYPE, MSG) \ 65 throw TYPE (MSG, __FILE__, __LINE__) 68 # define HPP_MAKE_EXCEPTION(EXTRA_QUALIFIER, TYPE) \ 69 class EXTRA_QUALIFIER TYPE : public ::hpp::Exception \ 72 TYPE (const std::string& message, \ 73 const std::string& file, \ 74 unsigned line) throw () \ 75 : ::hpp::Exception (message, file, line) \ 80 # define HPP_MAKE_EXCEPTION_NO_QUALIFIER(TYPE) \ 81 class TYPE : public ::hpp::Exception \ 84 TYPE (const std::string& message, \ 85 const std::string& file, \ 86 unsigned line) throw () \ 87 : ::hpp::Exception (message, file, line) \ Definition: assertion.hh:24
HPP_UTIL_DLLAPI std::ostream & operator<<(std::ostream &o, const Exception &exception)
Override operator<< to handle exception display.
Definition: exception.cc:75
Main exception class for HPP.
Definition: exception.hh:26