27#include <initializer_list>
66 Exception( std::initializer_list<std::string_view> ) ;
69 explicit Exception( std::string_view what ) ;
72 Exception( std::string_view what , std::string_view more ) ;
75 Exception( std::string_view what , std::string_view more1 , std::string_view more2 ) ;
78 Exception( std::string_view what , std::string_view more1 , std::string_view more2 , std::string_view more3 ) ;
81 Exception( std::string_view what , std::string_view more1 , std::string_view more2 , std::string_view more3 , std::string_view more4 ) ;
85 static std::string join( std::initializer_list<std::string_view> ) ;
88#define G_EXCEPTION_CLASS_( class_name , description ) \
89 class class_name : public G::Exception { public: \
90 class_name() : G::Exception(description) {} \
91 explicit class_name( std::string_view more ) : G::Exception(description,more) {} \
92 class_name( std::string_view more1 , std::string_view more2 ) : G::Exception(description,more1,more2) {} \
93 class_name( std::string_view more1 , std::string_view more2 , std::string_view more3 ) : G::Exception(description,more1,more2,more3) {} } ;
95#define G_EXCEPTION_FUNCTION_( name , description ) \
96 inline static G::Exception name() { return G::Exception((description)) ; } \
97 inline static G::Exception name( std::string_view s ) { return G::Exception(description,s) ; } \
98 inline static G::Exception name( std::string_view s1 , std::string_view s2 ) { return G::Exception(description,s1,s2) ; } \
99 inline static G::Exception name( std::string_view s1 , std::string_view s2 , std::string_view s3 ) { return G::Exception(description,s1,s2,s3) ; } \
100 inline static G::Exception name( std::string_view s1 , std::string_view s2 , std::string_view s3 , std::string_view s4 ) { return G::Exception(description,s1,s2,s3,s4) ; }
102#define G_EXCEPTION_CLASS( class_name , tx_description ) G_EXCEPTION_CLASS_( class_name , G::tx_description )
103#define G_EXCEPTION_FUNCTION( name , tx_description ) G_EXCEPTION_FUNCTION_( name , G::tx_description )
104#define G_EXCEPTION( class_name , tx_description ) G_EXCEPTION_FUNCTION_( class_name , G::tx_description )
A general-purpose exception class derived from std::exception and containing an error message.
Exception(std::initializer_list< std::string_view >)
Constructor.