P4C
The P4 Compiler
|
Public Member Functions | |
template<MessageType type, int errorCode> | |
bool | add (const char *name, bool forceReplace=false) |
cstring | getName (int errorCode) |
retrieve the name for errorCode | |
bool | isError (int errorCode) |
bool | isError (std::string_view name) |
return true if the given diagnostic can only be an error; false otherwise | |
Static Public Member Functions | |
static ErrorCatalog & | getCatalog () |
Return the singleton object. | |
|
inline |
add to the catalog returns false if the code already exists and forceReplace was not set to true
type | - error/warning/info message |
errorCode | - integer value for the error/warning |
name | - name for the error. Used to enable/disable all errors of that type |
forceReplace | - override an existing error type in the catalog |