52 explicit Exception(
const std::string & what ) ;
55 Exception(
const char * what ,
const std::string & more ) ;
58 Exception(
const std::string & what ,
const std::string & more ) ;
61 Exception(
const std::string & what ,
const std::string & more1 ,
const std::string & more2 ) ;
64 Exception(
const std::string & what ,
const std::string & more1 ,
const std::string & more2 ,
const std::string & more3 ) ;
70 virtual const char *
what()
const g__noexcept override ;
73 void prepend(
const char * context ) ;
77 void append(
const char * more ) ;
81 void append(
const std::string & more ) ;
86 #define G_EXCEPTION_CLASS( class_name , description ) class class_name : public G::Exception { public: class_name() : G::Exception(description) {} explicit class_name(const char *more) : G::Exception(description,more) {} explicit class_name(const std::string &more) : G::Exception(description,more) {} class_name(const std::string &more1,const std::string &more2) : G::Exception(description,more1,more2) {} class_name(const std::string &more1,const std::string &more2,const std::string &more3) : G::Exception(description,more1,more2,more3) {} }
89 #define G_EXCEPTION( class_name , description ) G_EXCEPTION_CLASS( class_name , description )
virtual const char * what() const g__noexcept override
Override from std::exception.
Exception(const char *what)
Constructor.
void prepend(const char *context)
Prepends context to the what string.
virtual ~Exception() g__noexcept
Destructor.
void append(const char *more)
Appends 'more' to the what string.
A general-purpose exception class derived from std::exception and containing a std::string.