E-MailRelay
|
A general-purpose exception class derived from std::exception and containing an error message. More...
#include <gexception.h>
Public Member Functions | |
Exception (std::initializer_list< std::string_view >) | |
Constructor. More... | |
Exception (std::string_view what) | |
Constructor. More... | |
Exception (std::string_view what, std::string_view more) | |
Constructor. More... | |
Exception (std::string_view what, std::string_view more1, std::string_view more2) | |
Constructor. More... | |
Exception (std::string_view what, std::string_view more1, std::string_view more2, std::string_view more3) | |
Constructor. More... | |
Exception (std::string_view what, std::string_view more1, std::string_view more2, std::string_view more3, std::string_view more4) | |
Constructor. More... | |
A general-purpose exception class derived from std::exception and containing an error message.
Provides constructors that simplify the assembly of multi-part error messages.
Usage:
The G_EXCEPTION macro is normally used in class declarations, as follows:
The tx() identifies the string at build-time as requiring translation. The G_EXCEPTION macro adds a "G::" scope so that at compile-time the do-nothing function G::tx() from "ggettext.h" is used. The xgettext utility should be run as "xgettext --c++ --keyword=tx". Note that xgettext keywords cannot use scoped names.
Definition at line 63 of file gexception.h.
G::Exception::Exception | ( | std::initializer_list< std::string_view > | args | ) |
Constructor.
Definition at line 25 of file gexception.cpp.
|
explicit |
Constructor.
Definition at line 30 of file gexception.cpp.
G::Exception::Exception | ( | std::string_view | what, |
std::string_view | more | ||
) |
Constructor.
Definition at line 35 of file gexception.cpp.
G::Exception::Exception | ( | std::string_view | what, |
std::string_view | more1, | ||
std::string_view | more2 | ||
) |
Constructor.
Definition at line 40 of file gexception.cpp.
G::Exception::Exception | ( | std::string_view | what, |
std::string_view | more1, | ||
std::string_view | more2, | ||
std::string_view | more3 | ||
) |
Constructor.
Definition at line 45 of file gexception.cpp.
G::Exception::Exception | ( | std::string_view | what, |
std::string_view | more1, | ||
std::string_view | more2, | ||
std::string_view | more3, | ||
std::string_view | more4 | ||
) |
Constructor.
Definition at line 51 of file gexception.cpp.