#include <stdexcept>
#include <string>
Go to the source code of this file.
Namespaces | |
namespace | GG |
Classes | |
class | GG::ExceptionBase |
This is the base class for all GG exceptions. More... | |
Defines | |
#define | GG_EXCEPTION(name) |
#define | GG_ABSTRACT_EXCEPTION(name) |
#define | GG_CONCRETE_EXCEPTION(name, class_name, superclass) |
Definition in file Exception.h.
#define GG_EXCEPTION | ( | name | ) |
Value:
class GG_API name : public ExceptionBase \ { \ public: \ name () throw() : ExceptionBase() {} \ name (const std::string& msg) throw() : ExceptionBase(msg) {} \ virtual const char* type() const throw() \ {return "GG::" # name ;} \ };
This should be used to declare GG exceptions at global scope.
Definition at line 72 of file Exception.h.
#define GG_ABSTRACT_EXCEPTION | ( | name | ) |
Value:
class GG_API name : public ExceptionBase \ { \ public: \ name () throw() : ExceptionBase() {} \ name (const std::string& msg) throw() : ExceptionBase(msg) {} \ virtual const char* type() const throw() = 0; \ };
This should be used along with GG_CONCRETE_EXCEPTION to group all exceptions from a single GG class under one subhierarchy.
Definition at line 85 of file Exception.h.
#define GG_CONCRETE_EXCEPTION | ( | name, | |||
class_name, | |||||
superclass | ) |
Value:
class GG_API name : public superclass \ { \ public: \ name () throw() : superclass () {} \ name (const std::string& msg) throw() : superclass (msg) {} \ virtual const char* type() const throw() \ {return # class_name "::" # name ;} \ };
This should be used along with GG_ABSTRACT_EXCEPTION to group all exceptions from a single GG class under one subhierarchy.
Definition at line 96 of file Exception.h.