36#ifndef HPP_UTIL_EXCEPTION_HH 37#define HPP_UTIL_EXCEPTION_HH 38#include <hpp/util/config.hh> 47class HPP_UTIL_DLLAPI
Exception :
public std::exception {
49 Exception(
const std::string& message,
const std::string& file,
50 unsigned line)
throw();
55 virtual const char*
what()
const throw();
61 virtual std::ostream&
print(std::ostream& o)
const throw();
74HPP_UTIL_DLLAPI std::ostream&
operator<<(std::ostream& o,
80#define HPP_THROW_EXCEPTION_(MSG) \ 81 throw ::hpp::Exception(MSG, __FILE__, __LINE__) 84#define HPP_THROW_EXCEPTION(TYPE, MSG) throw TYPE(MSG, __FILE__, __LINE__) 87#define HPP_MAKE_EXCEPTION(EXTRA_QUALIFIER, TYPE) \ 88 class EXTRA_QUALIFIER TYPE : public ::hpp::Exception { \ 90 TYPE(const std::string& message, const std::string& file, unsigned line) \ 91 throw() : ::hpp::Exception(message, file, line) {} \ 95#define HPP_MAKE_EXCEPTION_NO_QUALIFIER(TYPE) \ 96 class TYPE : public ::hpp::Exception { \ 98 TYPE(const std::string& message, const std::string& file, unsigned line) \ 99 throw() : ::hpp::Exception(message, file, line) {} \ Main exception class for HPP.
Definition exception.hh:47
Exception(const std::string &message, const std::string &file, unsigned line)
Definition exception.cc:43
Exception & operator=(const Exception &exception)
Definition exception.cc:60
virtual std::ostream & print(std::ostream &o) const
Display the exception on the specified output stream.
Definition exception.cc:74
virtual const char * what() const
Definition exception.cc:69
Definition assertion.hh:45
HPP_UTIL_DLLAPI std::ostream & operator<<(std::ostream &o, const Exception &exception)
Override operator<< to handle exception display.
Definition exception.cc:79