|
Nearly CC
An educational compiler skeleton
|
Exception type for semantic errors. More...
#include "exceptions.h"


Public Member Functions | |
| SemanticError (const Location &loc, const std::string &desc) | |
| Constructor. More... | |
| SemanticError (const SemanticError &other) | |
| Copy constructor. More... | |
| bool | has_location () const |
| Check whether this exception has a valud source Location. More... | |
| const Location & | get_loc () const |
| Get the source Location. More... | |
Static Public Member Functions | |
| static void | raise (const Location &loc, const char *fmt,...) EX_PRINTF_FORMAT |
| Throw a SemanticError exception. More... | |
Exception type for semantic errors.
| SemanticError::SemanticError | ( | const Location & | loc, |
| const std::string & | desc | ||
| ) |
Constructor.
| loc | the source Location |
| desc | description of the error |
| SemanticError::SemanticError | ( | const SemanticError & | other | ) |
Copy constructor.
| other | the SemanticError object to copy from |
|
inherited |
|
inlineinherited |
|
static |
Throw a SemanticError exception.
The description is generated from printf-style formatting.
| fmt | the format string |
| ... | argument values (corresponding to conversions in the format string) |