libNuML 1.1.1
Library for reading / writing NuML documents
NUMLError.h File Reference
#include <numl/common/extern.h>
#include <sbml/xml/XMLError.h>
#include <numl/NUMLNamespaces.h>

Go to the source code of this file.

Classes

class  NUMLError
 contains all error information collected More...
 

Enumerations

enum  NUMLErrorCode_t {
  NUMLUnknownError = 10000 , NUMLNotUTF8 = 10101 , NUMLUnrecognizedElement = 10102 , NUMLNotSchemaConformant = 10103 ,
  NUMLInvalidMathElement = 10201 , NUMLMultipleAssignmentOrRateRules = 10304 , NUMLMultipleEventAssignmentsForId = 10305 , NUMLEventAndAssignmentRuleForId = 10306 ,
  NUMLDuplicateMetaId = 10307 , NUMLInvalidSBOTermSyntax = 10308 , NUMLInvalidMetaidSyntax = 10309 , NUMLInvalidIdSyntax = 10310 ,
  NUMLInvalidUnitIdSyntax = 10311 , NUMLMissingAnnotationNamespace = 10401 , NUMLDuplicateAnnotationNamespaces = 10402 , NUMLNamespaceInAnnotation = 10403 ,
  NUMLMissingOntologyTerms = 10502 , NUMLMissingResultComponents = 10503 , NUMLInconsistentArgUnits = 10501 , NUMLAssignRuleCompartmentMismatch = 10511 ,
  NUMLOverdeterminedSystem = 10601 , NUMLInvalidModelSBOTerm = 10701 , NUMLInvalidFunctionDefSBOTerm = 10702 , NUMLInvalidRuleSBOTerm = 10705 ,
  NUMLInvalidConstraintSBOTerm = 10706 , NUMLNotesNotInXHTMLNamespace = 10801 , NUMLNotesContainsXMLDecl = 10802 , NUMLNotesContainsDOCTYPE = 10803 ,
  NUMLInvalidNotesContent = 10804 , NUMLInvalidNamespaceOnNUML = 20101 , NUMLMissingOrInconsistentLevel = 20102 , NUMLMissingOrInconsistentVersion = 20103 ,
  NUMLAnnotationNotesNotAllowedLevel1 = 20104 , NUMLMissingModel = 20201 , NUMLIncorrectOrderInModel = 20202 , NUMLEmptyListElement = 20203 ,
  NUMLNeedCompartmentIfHaveSpecies = 20204 , NUMLFunctionDefMathNotLambda = 20301 , NUMLInvalidApplyCiInLambda = 20302 , NUMLConstraintNotInXHTMLNamespace = 21003 ,
  NUMLConstraintContainsXMLDecl = 21004 , NUMLConstraintContainsDOCTYPE = 21005 , NUMLInvalidConstraintContent = 21006 , NUMLEventAssignmentForConstantEntity = 21212 ,
  NUMLGeneralWarningNotSpecified = 29999 , LibNUMLAdditionalCodesLowerBound = 90000 , NUMLCannotConvertToL1V1 = 90001 , NUMLNoEventsInL1 = 91001 ,
  NUMLStrictUnitsRequiredInL1 = 91014 , NUMLNoConstraintsInL2v1 = 92001 , NUMLStrictUnitsRequiredInL2v1 = 92008 , InvalidNUMLLevelVersion = 99101 ,
  NUMLInvalidRuleOrdering = 99106 , NUMLNoTimeSymbolInFunctionDef = 99301 , NUMLUnrecognisedSBOTerm = 99701 , NUMLObseleteSBOTerm = 99702 ,
  NUMLOffsetNotValidAttribute = 99925 , NUMLCodesUpperBound = 99999
}
 Codes for all NUML-level errors and warnings. More...
 
enum  NUMLErrorCategory_t {
  LIBNUML_CAT_INTERNAL , LIBNUML_CAT_NUML = (LIBSBML_CPP_NAMESPACE_QUALIFIER LIBSBML_CAT_XML + 1) , LIBNUML_CAT_NUML_L1_COMPAT , LIBNUML_CAT_NUML_L1V1_COMPAT ,
  LIBNUML_CAT_GENERAL_CONSISTENCY , LIBNUML_CAT_IDENTIFIER_CONSISTENCY , LIBNUML_CAT_INTERNAL_CONSISTENCY
}
 Category codes for NUMLError diagnostics. More...
 
enum  NUMLErrorSeverity_t {
  LIBNUML_SEV_ERROR = LIBSBML_CPP_NAMESPACE_QUALIFIER LIBSBML_SEV_ERROR , LIBNUML_SEV_FATAL = LIBSBML_CPP_NAMESPACE_QUALIFIER LIBSBML_SEV_FATAL , LIBNUML_SEV_WARNING = LIBSBML_CPP_NAMESPACE_QUALIFIER LIBSBML_SEV_WARNING , LIBNUML_SEV_SCHEMA_ERROR = (LIBNUML_SEV_FATAL + 1) ,
  LIBNUML_SEV_GENERAL_WARNING , LIBNUML_SEV_NOT_APPLICABLE
}
 Severity codes for NUMLError diagnostics. More...
 

Enumeration Type Documentation

◆ NUMLErrorCategory_t

Category codes for NUMLError diagnostics.

Note that these are distinct from XMLError's category codes. User programs receiving an NUMLError object can use this distinction to check whether the error represents a low-level XML problem or an NUML problem.

Enumerator
LIBNUML_CAT_INTERNAL 
LIBNUML_CAT_NUML 

General NUML error not falling into another category below.

LIBNUML_CAT_NUML_L1_COMPAT 

Category of errors that can only occur during attempted translation from one Level/Version of NUML to another.

This particular category applies to errors encountered while trying to convert a numl objects from NUML Level 2 to NUML Level 1.

LIBNUML_CAT_NUML_L1V1_COMPAT 

Category of errors that can only occur during attempted translation from one Level/Version of NUML to another.

This particular category applies to errors encountered while trying to convert a numl objects to NUML Level 1 Version 1.

LIBNUML_CAT_GENERAL_CONSISTENCY 

Category of errors that can occur while validating general NUML constructs.

With respect to the NUML specification, these concern failures in applying the validation rules numbered 2xxxx in the Level 2 Versions 2 and 3 specifications.

LIBNUML_CAT_IDENTIFIER_CONSISTENCY 

Category of errors that can occur while validating symbol identifiers in a numl objects.

With respect to the NUML specification, these concern failures in applying the validation rules numbered 103xx in the Level 2 Versions 2 and 3 specifications.

LIBNUML_CAT_INTERNAL_CONSISTENCY 

Category of errors that can occur while validating libNUML's internal representation of NUML constructs.

(These are tests performed by libNUML and do not have equivalent NUML validation rules.)

◆ NUMLErrorCode_t

Codes for all NUML-level errors and warnings.

These are distinguished from the XML layer (LIBLAX) error codes by being numbered > 10000, while the XML layer's codes are < 9999. Calling programs may wish to check whether a given NUMLError object's error identifier is actually from NUMLErrorCode_t or XMLError::XMLErrorCode_t. This distinction corresponds to whether a given error represents a low-level XML problem or an NUML problem.

Enumerator
NUMLUnknownError 

Unknown internal libNUML error.

NUMLNotUTF8 

Not UTF8.

NUMLUnrecognizedElement 

Unrecognized element.

NUMLNotSchemaConformant 

Not conformant to NUML XML schema.

NUMLInvalidMathElement 

Invalid MathML.

NUMLMultipleAssignmentOrRateRules 

Multiple rules for the same variable.

NUMLMultipleEventAssignmentsForId 

Multiple event assignments for the same variable.

NUMLEventAndAssignmentRuleForId 

variable value used in both event assignments and assignment rules

NUMLDuplicateMetaId 

Duplicate metaid identifier.

NUMLInvalidSBOTermSyntax 

Invalid sboTerm value syntax.

NUMLInvalidMetaidSyntax 

Invalid metaid value syntax.

NUMLInvalidIdSyntax 

Invalid identifier syntax.

NUMLInvalidUnitIdSyntax 

Invalid unit identifier syntax.

NUMLMissingAnnotationNamespace 

Missing declaration of XML namespace for annotation.

NUMLDuplicateAnnotationNamespaces 

Multiple annotations using same XML namespace.

NUMLNamespaceInAnnotation 

Invalid use of NUML XML namespace in annotation.

NUMLMissingOntologyTerms 

Missing OntologyTerms.

NUMLMissingResultComponents 

Missing ResultComponents.

NUMLInconsistentArgUnits 

Units of arguments to function call do not match function's definition.

NUMLAssignRuleCompartmentMismatch 

Mismatched units in assignment rule for compartment.

NUMLOverdeterminedSystem 

Model is overdetermined.

NUMLInvalidModelSBOTerm 

Invalid sboTerm value for model.

NUMLInvalidFunctionDefSBOTerm 

Invalid sboTerm value for function definition.

NUMLInvalidRuleSBOTerm 

Invalid sboTerm value for rule.

NUMLInvalidConstraintSBOTerm 

Invalid sboTerm value for constraint.

NUMLNotesNotInXHTMLNamespace 

Notes not placed in XHTML namespace.

NUMLNotesContainsXMLDecl 

XML declarations not permitted in notes.

NUMLNotesContainsDOCTYPE 

XML DOCTYPE not permitted in notes.

NUMLInvalidNotesContent 

Invalid notes content.

NUMLInvalidNamespaceOnNUML 

Invalid XML namespace for NUML container.

NUMLMissingOrInconsistentLevel 

Missing or inconsistent value for level attribute.

NUMLMissingOrInconsistentVersion 

Missing or inconsistent value for version attribute.

NUMLAnnotationNotesNotAllowedLevel1 

Annotation on <numl> not permitted in NUML Level 1.

NUMLMissingModel 

Missing model.

NUMLIncorrectOrderInModel 

Incorrect ordering of components in model definition.

NUMLEmptyListElement 

A given listOf___, if present, cannot be empty.

NUMLNeedCompartmentIfHaveSpecies 

Missing compartment in species definition.

NUMLFunctionDefMathNotLambda 

Invalid expression in function definition.

NUMLInvalidApplyCiInLambda 

Invalid forward reference in <apply><ci>...</ci></apply> value.

NUMLConstraintNotInXHTMLNamespace 

Constraint message is not in XHTML XML namespace.

NUMLConstraintContainsXMLDecl 

XML declarations not permitted in constraint messages.

NUMLConstraintContainsDOCTYPE 

XML DOCTYPE not permitted in constraint messages.

NUMLInvalidConstraintContent 

Invalid content for constraint message.

NUMLEventAssignmentForConstantEntity 

Cannot assign to a constant component in an event assignment.

NUMLGeneralWarningNotSpecified 

Unknown error.

LibNUMLAdditionalCodesLowerBound 

Lower bound of libNUML-specific codes.

NUMLCannotConvertToL1V1 

Cannot convert to NUML Level 1 Version 1.

NUMLNoEventsInL1 

NUML Level 1 does not support events.

NUMLStrictUnitsRequiredInL1 

NUML Level 1 requires strict unit consistency.

NUMLNoConstraintsInL2v1 

NUML Level 2 Version 1 does not support constraints.

NUMLStrictUnitsRequiredInL2v1 

NUML Level 2 Version 1 requires strict unit consistency.

InvalidNUMLLevelVersion 

Invalid NUML Level and Version.

NUMLInvalidRuleOrdering 

Invalid ordering of rules.

NUMLNoTimeSymbolInFunctionDef 

<csymbol> for time used within the <math> of a function definition

NUMLUnrecognisedSBOTerm 

Unrecognized sboTerm value.

NUMLObseleteSBOTerm 

Obsolete sboTerm value.

NUMLOffsetNotValidAttribute 

Attribute offset on units only available in NUML Level 2 Version 1.

NUMLCodesUpperBound 

99999, the upper bound of all libNUML codes.

Application-specific codes should begin at 100000.

◆ NUMLErrorSeverity_t

Severity codes for NUMLError diagnostics.

These are distinct from XMLError's severity codes.

See also
XMLErrorSeverity_t
Enumerator
LIBNUML_SEV_ERROR 
LIBNUML_SEV_FATAL 
LIBNUML_SEV_WARNING 
LIBNUML_SEV_SCHEMA_ERROR 

The XML content does not conform to the relevant version of the NUML XML Schema.

The content is not valid NUML.

LIBNUML_SEV_GENERAL_WARNING 

The XML content is invalid for some levels/versions of NUML, and while it may be valid in others, it is something that is best avoided anyway.

LibNUML will issue warnings in those cases it can recognize.

LIBNUML_SEV_NOT_APPLICABLE 

This error code is only a placeholder for errors that have relevance to some versions of NUML but not others.