libNuML 1.1.1
Library for reading / writing NuML documents
|
contains all error information collected More...
#include <NUMLError.h>
Public Member Functions | |
NUMLError (const unsigned int errorId=0, const unsigned int level=NUML_DEFAULT_LEVEL, const unsigned int version=NUML_DEFAULT_VERSION, const std::string &details="", const unsigned int line=0, const unsigned int column=0, const unsigned int severity=LIBNUML_SEV_ERROR, const unsigned int category=LIBNUML_CAT_NUML) | |
Creates a new NUMLError to report that something occurred during NUML processing. More... | |
NUMLError (const NUMLError &orig) | |
Copy constructor; creates a copy of this NUMLError. More... | |
virtual NUMLError * | clone () const |
clone function More... | |
Protected Member Functions | |
virtual std::string | stringForSeverity (unsigned int code) const |
virtual std::string | stringForCategory (unsigned int code) const |
contains all error information collected
NUMLError::NUMLError | ( | const unsigned int | errorId = 0 , |
const unsigned int | level = NUML_DEFAULT_LEVEL , |
||
const unsigned int | version = NUML_DEFAULT_VERSION , |
||
const std::string & | details = "" , |
||
const unsigned int | line = 0 , |
||
const unsigned int | column = 0 , |
||
const unsigned int | severity = LIBNUML_SEV_ERROR , |
||
const unsigned int | category = LIBNUML_CAT_NUML |
||
) |
Creates a new NUMLError to report that something occurred during NUML processing.
When a libNUML operation on NUML content results in a warning, error or other diagnostic, the issue is reported as an NUMLError object. NUMLError objects have identification numbers to indicate the nature of the exception. The argument errorId
to this constructor can be (but does not have to be) a value from this
If the error identifier errorId
is a number greater than 99999, the NUMLError class assumes the error was generated from another part of the software and does not do additional filling in of values beyond the default in the constructor itself. This allows NUMLError to serve as a base class for other errors, such as for user-defined validation rules (see Validator). Callers should fill in all the parameters with suitable values if generating errors with codes greater than 99999 to make maximum use of the NUMLError facilities.
Please see the top of the documentation for NUMLError for a longer discussion of the possible error codes, their meanings, and their applicability to different combinations of Level+Version of NUML.
errorId | an unsigned int, the identification number of the error. |
level | the NUML Level of the NUML model |
version | the NUML Version within the Level of the NUML model |
details | a string containing additional details about the error. If the error code in errorId is one that is recognized by NUMLError, the given message is appended to a predefined message associated with the given code. If the error code is not recognized, the message is stored as-is as the text of the error. |
line | an unsigned int, the line number at which the error occured. |
column | an unsigned int, the column number at which the error occured. |
severity | an integer indicating severity of the error. |
category | an integer indicating the category to which the error belongs. |
@docnote The native C++ implementation of this method defines a default argument value. In the documentation generated for different libNUML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libNUML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
|
virtual |
clone function
|
protectedvirtual |
|
protectedvirtual |