62 # define RT_PRINTF_FORMAT __attribute__ ((format (printf, 1, 2), noreturn))
63 # define EX_PRINTF_FORMAT __attribute__ ((format (printf, 2, 3), noreturn))
65 # define RT_PRINTF_FORMAT
66 # define EX_PRINTF_FORMAT
87 static void raise(
const char *fmt, ...) RT_PRINTF_FORMAT;
108 static void raise(
const Location &loc,
const char *fmt, ...) EX_PRINTF_FORMAT;
129 static void raise(
const Location &loc,
const char *fmt, ...) EX_PRINTF_FORMAT;
Base type for exceptions indicating a syntax error,.
Definition: exceptions.h:35
BaseException(const Location &loc, const std::string &desc)
Constructor.
Definition: exceptions.cpp:31
bool has_location() const
Check whether this exception has a valud source Location.
Definition: exceptions.h:54
const Location & get_loc() const
Get the source Location.
Definition: exceptions.cpp:44
Definition: location.h:26
Exception type for general runtime errors that aren't associated with source code.
Definition: exceptions.h:71
RuntimeError(const std::string &desc)
Constuctor.
Definition: exceptions.cpp:52
Exception type for semantic errors.
Definition: exceptions.h:112
SemanticError(const Location &loc, const std::string &desc)
Constructor.
Definition: exceptions.cpp:100
Exception type for lexical or syntax errors.
Definition: exceptions.h:91
SyntaxError(const Location &loc, const std::string &desc)
Constructor.
Definition: exceptions.cpp:76