exception.hh File Reference
#include <iosfwd>
#include <stdexcept>
#include <string>
#include <hpp/util/config.hh>
Include dependency graph for exception.hh:
This graph shows which files directly or indirectly include this file:

Classes

class  hpp::Exception
 Main exception class for HPP. More...

Namespaces

namespace  hpp

Defines

#define HPP_THROW_EXCEPTION_(MSG)   throw ::hpp::Exception (MSG, __FILE__, __LINE__)
 Launch a HPP exception.
#define HPP_THROW_EXCEPTION(TYPE, MSG)   throw TYPE (MSG, __FILE__, __LINE__)
 Launch a HPP exception (generic macro).
#define HPP_MAKE_EXCEPTION(EXTRA_QUALIFIER, TYPE)
 Define a custom exception.
#define HPP_MAKE_EXCEPTION_NO_QUALIFIER(TYPE)
 Define a custom exception without extra qualifier.

Functions

HPP_UTIL_DLLAPI std::ostream & hpp::operator<< (std::ostream &o, const Exception &exception)
 Override operator<< to handle exception display.

Detailed Description


Define Documentation

#define HPP_MAKE_EXCEPTION (   EXTRA_QUALIFIER,
  TYPE 
)
Value:
class EXTRA_QUALIFIER TYPE : public ::hpp::Exception  \
  {             \
  public:           \
    TYPE (const std::string& message,     \
    const std::string& file,      \
    unsigned line) throw ()     \
      : ::hpp::Exception (message, file, line)    \
      {}            \
  }

Define a custom exception.

#define HPP_MAKE_EXCEPTION_NO_QUALIFIER (   TYPE)
Value:
class TYPE : public ::hpp::Exception      \
  {             \
  public:           \
    TYPE (const std::string& message,     \
    const std::string& file,      \
    unsigned line) throw ()     \
      : ::hpp::Exception (message, file, line)    \
      {}            \
  }

Define a custom exception without extra qualifier.

#define HPP_THROW_EXCEPTION (   TYPE,
  MSG 
)    throw TYPE (MSG, __FILE__, __LINE__)

Launch a HPP exception (generic macro).

#define HPP_THROW_EXCEPTION_ (   MSG)    throw ::hpp::Exception (MSG, __FILE__, __LINE__)

Launch a HPP exception.