42 #define INTERNAL_ERROR(msg) \
44 reportInternalError(msg, __FILE__, __LINE__); \
47 #define INTERNAL_ERROR_UNIMPLEMENTED() \
48 INTERNAL_ERROR("Called function that has not been implemented.")
54 (
const string& errorMsg,
const char* file,
unsigned int lineNumber);
57 template<
class Exception>
59 throw Exception(
"ERROR: " + errorMsg +
'\n');
63 #define DEFINE_EXCEPTION(NAME) \
64 class NAME##Exception : public FrobbyException { \
66 NAME##Exception(const string& str): FrobbyException(str) {} \
void reportSyntaxError(const Scanner &scanner, const string &errorMsg)
InternalFrobbyException(const string &str)
void reportInternalError(const string &errorMsg)
#define DEFINE_EXCEPTION(NAME)
FrobbyException(const string &str)
This exception signals that a bug in Frobby has been detected.
void reportError(const string &errorMsg)
This class offers an input interface which is more convenient and for some purposes more efficient th...
This is the base of the Frobby exception hierarchy for exceptions that can occur due to expected erro...
void throwError(const string &errorMsg)