Represents errors (and messages) encountered during an XML parse.


Enumerations | |
| enum | XMLErrorCategory_t { LIBSBML_CAT_INTERNAL = 0, LIBSBML_CAT_SYSTEM, LIBSBML_CAT_XML } |
| Category codes for errors in the XML layer. More... | |
| enum | XMLErrorCode_t { XMLUnknownError = 0, XMLOutOfMemory = 1, XMLFileUnreadable = 2, XMLFileUnwritable = 3, XMLFileOperationError = 4, XMLNetworkAccessError = 5, InternalXMLParserError = 101, UnrecognizedXMLParserCode = 102, XMLTranscoderError = 103, MissingXMLDecl = 1001, MissingXMLEncoding = 1002, BadXMLDecl = 1003, BadXMLDOCTYPE = 1004, InvalidCharInXML = 1005, BadlyFormedXML = 1006, UnclosedXMLToken = 1007, InvalidXMLConstruct = 1008, XMLTagMismatch = 1009, DuplicateXMLAttribute = 1010, UndefinedXMLEntity = 1011, BadProcessingInstruction = 1012, BadXMLPrefix = 1013, BadXMLPrefixValue = 1014, MissingXMLRequiredAttribute = 1015, XMLAttributeTypeMismatch = 1016, XMLBadUTF8Content = 1017, MissingXMLAttributeValue = 1018, BadXMLAttributeValue = 1019, BadXMLAttribute = 1020, UnrecognizedXMLElement = 1021, BadXMLComment = 1022, BadXMLDeclLocation = 1023, XMLUnexpectedEOF = 1024, BadXMLIDValue = 1025, BadXMLIDRef = 1026, UninterpretableXMLContent = 1027, BadXMLDocumentStructure = 1028, InvalidAfterXMLContent = 1029, XMLExpectedQuotedString = 1030, XMLEmptyValueNotPermitted = 1031, XMLBadNumber = 1032, XMLBadColon = 1033, MissingXMLElements = 1034, XMLContentEmpty = 1035, XMLErrorCodesUpperBound = 9999 } |
| Canonical error codes returned for low-level XML parser errors. More... | |
| enum | XMLErrorSeverity_t { LIBSBML_SEV_INFO = 0, LIBSBML_SEV_WARNING, LIBSBML_SEV_ERROR, LIBSBML_SEV_FATAL } |
| Severity codes for errors in the XML layer. More... | |
Functions | |
| LIBLAX_EXTERN XMLError_t * | XMLError_create (void) |
| Creates a new XMLError to report that something occurred. | |
| LIBLAX_EXTERN XMLError_t * | XMLError_createWithIdAndMessage (unsigned int errorId, const char *message) |
| Creates a new XMLError with the identification number and detailed message set. | |
| LIBLAX_EXTERN void | XMLError_free (XMLError_t *error) |
| Frees the given XMLError_t structure. | |
| LIBLAX_EXTERN unsigned int | XMLError_getCategory (const XMLError_t *error) |
| Return the category of this XMLError. | |
| LIBLAX_EXTERN const char * | XMLError_getCategoryAsString (const XMLError_t *error) |
| Return the category of this XMLError as a string. | |
| LIBLAX_EXTERN unsigned int | XMLError_getColumn (const XMLError_t *error) |
| Return the column number where this XMLError occurred. | |
| LIBLAX_EXTERN unsigned int | XMLError_getErrorId (const XMLError_t *error) |
| Returns the id of this XMLError. | |
| LIBLAX_EXTERN unsigned int | XMLError_getLine (const XMLError_t *error) |
| Return the line number where this XMLError occurred. | |
| LIBLAX_EXTERN const char * | XMLError_getMessage (const XMLError_t *error) |
| Returns the message text of this XMLError. | |
| LIBLAX_EXTERN unsigned int | XMLError_getSeverity (const XMLError_t *error) |
| Return the severity of this XMLError. | |
| LIBLAX_EXTERN const char * | XMLError_getSeverityAsString (const XMLError_t *error) |
| Return the severity of this XMLError as a string.erity_t. | |
| LIBLAX_EXTERN const char * | XMLError_getShortMessage (const XMLError_t *error) |
| Returns the short message text of this XMLError. | |
| LIBLAX_EXTERN int | XMLError_isError (const XMLError_t *error) |
Predicate returning true or false depending on whether this XMLError_t structure is an error. | |
| LIBLAX_EXTERN int | XMLError_isFatal (const XMLError_t *error) |
Predicate returning true or false depending on whether this XMLError_t structure is a fatal error. | |
| LIBLAX_EXTERN int | XMLError_isInfo (const XMLError_t *error) |
Predicate returning true or false depending on whether this XMLError_t structure is for information only. | |
| LIBLAX_EXTERN int | XMLError_isWarning (const XMLError_t *error) |
Predicate returning true or false depending on whether this XMLError_t structure is a warning. | |
| LIBLAX_EXTERN void | XMLError_print (const XMLError_t *error, FILE *stream) |
| Outputs this XMLError to stream in the following format (and followed by a newline): | |
| enum XMLErrorCategory_t |
Category codes for errors in the XML layer.
| enum XMLErrorCode_t |
Canonical error codes returned for low-level XML parser errors.
These codes are 4 digits long, less than 10000, to distinguish them from 5-digit SBML error codes > 10000. The codes are an abstraction of errors from the multiple parsers (Xerces, Expat, libxml2) supported by libSBML.
| enum XMLErrorSeverity_t |
Severity codes for errors in the XML layer.
These severity levels are based on those defined in the XML specification, with the addition of Info for informational messages.
| LIBLAX_EXTERN XMLError_t* XMLError_create | ( | void | ) |
Creates a new XMLError to report that something occurred.
| LIBLAX_EXTERN XMLError_t* XMLError_createWithIdAndMessage | ( | unsigned int | errorId, |
| const char * | message | ||
| ) |
Creates a new XMLError with the identification number and detailed message set.
If the identifier is < 10000, it must be one of the predefined XML layer error codes.
| errorId | an unsigned int, the identification number of the error. |
| message | a string, the error message. |
| LIBLAX_EXTERN void XMLError_free | ( | XMLError_t * | error | ) |
Frees the given XMLError_t structure.
| error | the XMLError_t structure to be freed. |
| LIBLAX_EXTERN unsigned int XMLError_getCategory | ( | const XMLError_t * | error | ) |
| LIBLAX_EXTERN const char* XMLError_getCategoryAsString | ( | const XMLError_t * | error | ) |
| LIBLAX_EXTERN unsigned int XMLError_getColumn | ( | const XMLError_t * | error | ) |
| LIBLAX_EXTERN unsigned int XMLError_getErrorId | ( | const XMLError_t * | error | ) |
| LIBLAX_EXTERN unsigned int XMLError_getLine | ( | const XMLError_t * | error | ) |
| LIBLAX_EXTERN const char* XMLError_getMessage | ( | const XMLError_t * | error | ) |
| LIBLAX_EXTERN unsigned int XMLError_getSeverity | ( | const XMLError_t * | error | ) |
| LIBLAX_EXTERN const char* XMLError_getSeverityAsString | ( | const XMLError_t * | error | ) |
| LIBLAX_EXTERN const char* XMLError_getShortMessage | ( | const XMLError_t * | error | ) |
| LIBLAX_EXTERN int XMLError_isError | ( | const XMLError_t * | error | ) |
Predicate returning true or false depending on whether this XMLError_t structure is an error.
| error | the XMLError_t. |
non-zero (true) if this XMLError is an error, zero (false) otherwise. | LIBLAX_EXTERN int XMLError_isFatal | ( | const XMLError_t * | error | ) |
Predicate returning true or false depending on whether this XMLError_t structure is a fatal error.
| error | the XMLError_t. |
non-zero (true) if this XMLError is a fatal error, zero (false) otherwise. | LIBLAX_EXTERN int XMLError_isInfo | ( | const XMLError_t * | error | ) |
Predicate returning true or false depending on whether this XMLError_t structure is for information only.
| error | the XMLError_t. |
non-zero (true) if this XMLError is for informational purposes only, zero (false) otherwise. | LIBLAX_EXTERN int XMLError_isWarning | ( | const XMLError_t * | error | ) |
Predicate returning true or false depending on whether this XMLError_t structure is a warning.
| error | the XMLError_t. |
non-zero (true) if this XMLError is a warning, zero (false) otherwise. | LIBLAX_EXTERN void XMLError_print | ( | const XMLError_t * | error, |
| FILE * | stream | ||
| ) |
Outputs this XMLError to stream in the following format (and followed by a newline):
line: (id) message
| error,the | XMLError_t structure to write. |
| stream,the | stream to write to. |