libSBML 5.3.0 Python API

libsbml.SBMLError Class Reference

Inheritance diagram for libsbml.SBMLError:
Inheritance graph
[legend]

List of all members.


Detailed Description

Representation of errors, warnings and other diagnostics.

This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.

When a libSBML operation on SBML content results in an error, or when there is something wrong with the SBML content, the problems are reported as SBMLError objects. These are generally stored in an SBMLErrorLog object; this log object, in turn, is kept in the SBMLDocument object containing the SBML content. Applications can obtain the list of logged errors using SBMLDocument.getErrorLog() and then use the methods provided by SBMLErrorLog to access individual SBMLError objects. (Note that despite the word 'error' in the name, SBMLError objects are used to represent not only 'true' errors, but also warnings and some informational diagnostics. The name is a historical hold-over from early versions of libSBML, in which the object really was only used to report errors.)

Each SBMLError object instance has an identification number that identifies the nature of the problem. This 'error id' number will be up to five digits long, and it will come from one of two sets of static integer constants defined in the interface class libsbml: either the SBML error identifiers (described below) or the XML error identifiers (described in the documentation for the class XMLError). The former set of constants includes all the SBML validation rule numbers listed in the appendices of the SBML specification documents, as well as some additional libSBML-specific error codes.

Error codes are useful mainly for software. For human readers, SBMLError also includes text messages that describe the nature of a given problem. The messages can be accessed using SBMLError.getShortMessage() and SBMLError.getMessage(). The former provides a brief one-line description of the issue, while SBMLError.getMessage() provides a more detailed text, including (if appropriate) references to sections of the SBML specifications where relevant topics are discussed. These text strings are suitable for displaying to human users.

An SBMLError object also contains a category code; its value may be retrieved using the method SBMLError.getCategory(). Category values are drawn from a set of static integer constants defined in libsbml and having names beginning with the characters LIBSBML_CAT_. The list of possible codes is described in a separate section below. Categories are used to partition errors into distinct conceptual groups. This is principally used by the libSBML validation system to group classes of validation checks. For example, LIBSBML_CAT_IDENTIFIER_CONSISTENCY is the category for tests that check identifier consistency; LIBSBML_CAT_MATHML_CONSISTENCY is the category for MathML consistency checking; and so on.

In addition, SBMLError also has a severity code. Its value may be retrieved using the method SBMLError.getSeverity(). The possible severity values are the same as those reported by XMLError. Severity levels currently range from informational (LIBSBML_SEV_INFO) to fatal errors (LIBSBML_SEV_FATAL). They can be used by an application to evaluate how serious a given problem is.

Finally, SBMLError records the line and column near where the problem occurred in the SBML content. The values may be retrieved using the methods SBMLError.getLine() and SBMLError.getColumn(). We say 'near', because a lot of factors affect how accurate the line/column information ultimately is. For example, different XML parsers have different conventions for which line and column number they report for a particular problem (which makes a difference when a problem involves an opening XML tag on one line and a closing tag on another line). In some situations, some parsers report invalid line and/or column numbers altogether. If this occurs, libSBML sets the line and/or column number in the SBMLError object to the the value of the maximum unsigned long integer representable on the platform where libSBML is running. (This is equal to the constant named ULONG_MAX in C and C++.) The probability that a true line or column number in an SBML model would equal this value is vanishingly small; thus, if an application encounters these values in an XMLError object, it can assume no valid line/column number could be provided by libSBML in that situation.

Error codes associated with SBMLError objects

The error and warning codes returned by libSBML are listed in the table below. The method SBMLError.getErrorId() returns the error code of a given SBMLError object instance. In the libSBML Python language interface, these error identifiers are currently implemented as static integer constants defined in the interface class libsbml.

In this table, the right-hand columns titled 'L1V1', 'L1V2', etc. refer to Levels and Versions of the SBML specifications, and the entries in each column refer to whether the severity of the condition in that particular Level+Version of SBML. The codes stand for the following:

N= Not applicable
I= Informational
W= Warning
E= Error
F= Fatal

The text shown in the 'Meaning' is the text returned by the SBMLError.getShortMessage() method on a given SBMLError object. A longer and (hopefully) clearer explanation of the issue is returned by SBMLError.getMessage().

Enumerator Meaning L 1 V 1 L 1 V 2 L 2 V 1 L 2 V 2 L 2 V 3 L 2 V 4 L 3 V 1
UnknownErrorEncountered unknown internal libSBML errorFFFFFFF
NotUTF8File does not use UTF-8 encodingEEEEEEE
UnrecognizedElementEncountered unrecognized elementEEEEEEE
NotSchemaConformantDocument does not conform to the SBML XML schemaEEEEEEE
L3NotSchemaConformantDocument is not well-formed XMLNNNNNNE
InvalidMathElementInvalid MathMLNNEEEEE
DisallowedMathMLSymbolDisallowed MathML symbol foundNNEEEEE
DisallowedMathMLEncodingUseUse of the MathML 'encoding' attribute is not allowed on this elementNNEEEEE
DisallowedDefinitionURLUseUse of the MathML 'definitionURL' attribute is not allowed on this elementNNEEEEE
BadCsymbolDefinitionURLValueInvalid <csymbol> 'definitionURL' attribute valueNNEEEEE
DisallowedMathTypeAttributeUseUse of the MathML 'type' attribute is not allowed on this elementNNEEEEE
DisallowedMathTypeAttributeValueDisallowed MathML 'type' attribute valueNNEEEEE
LambdaOnlyAllowedInFunctionDefUse of <lambda> not permitted outside of FunctionDefinition objectsNNEEEEE
BooleanOpsNeedBooleanArgsNon-Boolean argument given to Boolean operatorNNWEEEE
NumericOpsNeedNumericArgsNon-numerical argument given to numerical operatorNNWEEEE
ArgsToEqNeedSameTypeArguments to <eq> and <neq> must have the same data typesNNWEEEE
PiecewiseNeedsConsistentTypesTerms in a <piecewise> expression must have consistent data typesNNWEEEE
PieceNeedsBooleanThe second argument of a <piece> expression must yield a Boolean valueNNWEEEE
ApplyCiMustBeUserFunctionA <ci> element in this context must refer to a function definitionNNWEEEE
ApplyCiMustBeModelComponentA <ci> element in this context must refer to a model componentNNWEEEE
KineticLawParametersAreLocalOnlyCannot use a KineticLaw local parameter outside of its local scopeNNWEEEE
MathResultMustBeNumericA formula's result in this context must be a numerical valueNNWEEEE
OpsNeedCorrectNumberOfArgsIncorrect number of arguments given to MathML operatorNNWEEEE
InvalidNoArgsPassedToFunctionDefIncorrect number of arguments given to function invocationNNNNNEE
DisallowedMathUnitsUseAttribute 'units' is only permitted on <cn> elementsNNNNNNE
InvalidUnitsValueInvalid value given for the 'units' attributeNNNNNNE
DuplicateComponentIdDuplicate 'id' attribute valueEEEEEEE
DuplicateUnitDefinitionIdDuplicate unit definition 'id' attribute valueEEEEEEE
DuplicateLocalParameterIdDuplicate local parameter 'id' attribute valueEEEEEEE
MultipleAssignmentOrRateRulesMultiple rules for the same variable are not allowedEEEEEEE
MultipleEventAssignmentsForIdMultiple event assignments for the same variable are not allowedNNEEEEE
EventAndAssignmentRuleForIdAn event assignment and an assignment rule must not have the same value for 'variable'NNEEEEE
DuplicateMetaIdDuplicate 'metaid' attribute valueNNEEEEE
InvalidSBOTermSyntaxInvalid syntax for an 'sboTerm' attribute valueNNNEEEE
InvalidMetaidSyntaxInvalid syntax for a 'metaid' attribute valueNNEEEEE
InvalidIdSyntaxInvalid syntax for an 'id' attribute valueEEEEEEE
InvalidUnitIdSyntaxInvalid syntax for the identifier of a unitNNNEEEE
InvalidNameSyntaxInvalid syntax for a 'name' attribute valueNNNNNNE
MissingAnnotationNamespaceMissing declaration of the XML namespace for the annotationNNNEEEE
DuplicateAnnotationNamespacesMultiple annotations using the same XML namespaceNNNEEEE
SBMLNamespaceInAnnotationThe SBML XML namespace cannot be used in an Annotation objectNNNEEEN
MultipleAnnotationsOnly one Annotation object is permitted under a given SBML objectNNNNNNE
InconsistentArgUnitsThe units of the function call's arguments are not consistent with its definitionWWWEEWW
InconsistentKineticLawUnitsL3The kinetic law's units are inconsistent with those of other kinetic laws in the modelNNNNNNW
AssignRuleCompartmentMismatchMismatched units in assignment rule for compartmentEEEEEWW
AssignRuleSpeciesMismatchMismatched units in assignment rule for speciesEEEEEWW
AssignRuleParameterMismatchMismatched units in assignment rule for parameterEEEEEWW
AssignRuleStoichiometryMismatchMismatched units in assignment rule for stoichiometryNNNNNNW
InitAssignCompartmenMismatchMismatched units in initial assignment to compartmentNNNEEWW
InitAssignSpeciesMismatchMismatched units in initial assignment to speciesNNNEEWW
InitAssignParameterMismatchMismatched units in initial assignment to parameterNNNEEWW
InitAssignStoichiometryMismatchMismatched units in initial assignment to stoichiometryNNNNNNW
RateRuleCompartmentMismatchMismatched units in rate rule for compartmentEEEEEWW
RateRuleSpeciesMismatchMismatched units in rate rule for speciesEEEEEWW
RateRuleParameterMismatchMismatched units in rate rule for parameterEEEEEWW
RateRuleStoichiometryMismatchMismatched units in rate rule for stoichiometryNNNNNNW
KineticLawNotSubstancePerTimeThe units of the kinetic law are not 'substance'/'time'EEEEEWW
SpeciesInvalidExtentUnitsThe species' units are not consistent with units of extentNNNNNNW
DelayUnitsNotTimeThe units of the delay expression are not units of timeNNEEEWW
EventAssignCompartmentMismatchMismatched units in event assignment for compartmentNNEEEWW
EventAssignSpeciesMismatchMismatched units in event assignment for speciesNNEEEWW
EventAssignParameterMismatchMismatched units in event assignment for parameterNNEEEWW
EventAssignStoichiometryMismatchMismatched units in event assignment for stoichiometryNNNNNNW
PriorityUnitsNotDimensionlessThe units of a priority expression must be 'dimensionless'NNNNNNW
UpperUnitBoundUpper boundary of unit validation diagnostic codesNNNNNNN
OverdeterminedSystemThe model is overdeterminedWWWEEEE
InvalidModelSBOTermInvalid 'sboTerm' attribute value for a Model objectNNNEEWW
InvalidFunctionDefSBOTermInvalid 'sboTerm' attribute value for a FunctionDefinition objectNNNEEWW
InvalidParameterSBOTermInvalid 'sboTerm' attribute value for a Parameter objectNNNEEWW
InvalidInitAssignSBOTermInvalid 'sboTerm' attribute value for an InitialAssignment objectNNNEEWW
InvalidRuleSBOTermInvalid 'sboTerm' attribute value for a Rule objectNNNEEWW
InvalidConstraintSBOTermInvalid 'sboTerm' attribute value for a Constraint objectNNNEEWW
InvalidReactionSBOTermInvalid 'sboTerm' attribute value for a Reaction objectNNNEEWW
InvalidSpeciesReferenceSBOTermInvalid 'sboTerm' attribute value for a SpeciesReference objectNNNEEWW
InvalidKineticLawSBOTermInvalid 'sboTerm' attribute value for a KineticLaw objectNNNEEWW
InvalidEventSBOTermInvalid 'sboTerm' attribute value for an Event objectNNNEEWW
InvalidEventAssignmentSBOTermInvalid 'sboTerm' attribute value for an EventAssignment objectNNNEEWW
InvalidCompartmentSBOTermInvalid 'sboTerm' attribute value for a Compartment objectNNNNEWW
InvalidSpeciesSBOTermInvalid 'sboTerm' attribute value for a Species objectNNNNEWW
InvalidCompartmentTypeSBOTermInvalid 'sboTerm' attribute value for a CompartmentType objectNNNNEWN
InvalidSpeciesTypeSBOTermInvalid 'sboTerm' attribute value for a SpeciesType objectNNNNEWN
InvalidTriggerSBOTermInvalid 'sboTerm' attribute value for an Event Trigger objectNNNNEWW
InvalidDelaySBOTermInvalid 'sboTerm' attribute value for an Event Delay objectNNNNEWW
NotesNotInXHTMLNamespaceNotes must be placed in the XHTML XML namespaceEEEEEEE
NotesContainsXMLDeclXML declarations are not permitted in Notes objectsNNNEEEE
NotesContainsDOCTYPEXML DOCTYPE elements are not permitted in Notes objectsNNNEEEE
InvalidNotesContentInvalid notes content foundNNNEEEN
OnlyOneNotesElementAllowedOnly one Notes subobject is permitted on a given SBML objectNNNNNNE
InvalidNamespaceOnSBMLInvalid XML namespace for the SBML container elementEEEEEEE
MissingOrInconsistentLevelMissing or inconsistent value for the 'level' attributeEEEEEEE
MissingOrInconsistentVersionMissing or inconsistent value for the 'version' attributeEEEEEEE
PackageNSMustMatchInconsistent or invalid SBML Level/Version for the package namespace declarationNNNNNNE
LevelPositiveIntegerThe 'level' attribute must have a positive integer valueNNNNNNE
VersionPositiveIntegerThe 'version' attribute must have a positive integer valueNNNNNNE
AllowedAttributesOnSBMLInvalid attribute found on the SBML container elementNNNNNNE
MissingModelNo model definition foundEEEEEEE
IncorrectOrderInModelIncorrect ordering of components within the Model objectEEEEEEN
EmptyListElementEmpty ListOf___ object foundEEEEEEE
NeedCompartmentIfHaveSpeciesThe presence of a species requires a compartmentEEEEEEE
OneOfEachListOfOnly one of each kind of ListOf___ object is allowed inside a Model objectNNNNNNE
OnlyFuncDefsInListOfFuncDefsOnly FunctionDefinition, Notes and Annotation objects are allowed in ListOfFunctionDefinitionsNNNNNNE
OnlyUnitDefsInListOfUnitDefsOnly UnitDefinition, Notes and Annotation objects are allowed in ListOfUnitDefinitions objectsNNNNNNE
OnlyCompartmentsInListOfCompartmentsOnly Compartment, Notes and Annotation objects are allowed in ListOfCompartments objectsNNNNNNE
OnlySpeciesInListOfSpeciesOnly Species, Notes and Annotation objects are allowed in ListOfSpecies objectsNNNNNNE
OnlyParametersInListOfParametersOnly Parameter, Notes and Annotation objects are allowed in ListOfParameters objectsNNNNNNE
OnlyInitAssignsInListOfInitAssignsOnly InitialAssignment, Notes and Annotation objects are allowed in ListOfInitialAssignments objectsNNNNNNE
OnlyRulesInListOfRulesOnly Rule, Notes and Annotation objects are allowed in ListOfRules objectsNNNNNNE
OnlyConstraintsInListOfConstraintsOnly Constraint, Notes and Annotation objects are allowed in ListOfConstraints objectsNNNNNNE
OnlyReactionsInListOfReactionsOnly Reaction, Notes and Annotation objects are allowed in ListOfReactions objectsNNNNNNE
OnlyEventsInListOfEventsOnly Event, Notes and Annotation objects are allowed in ListOfEvents objectsNNNNNNE
L3ConversionFactorOnModelA 'conversionFactor' attribute value must reference a Parameter objectNNNNNNE
L3TimeUnitsOnModelInvalid 'timeUnits' attribute valueNNNNNNW
L3VolumeUnitsOnModelInvalid 'volumeUnits' attribute valueNNNNNNW
L3AreaUnitsOnModelInvalid 'areaUnits' attribute valueNNNNNNW
L3LengthUnitsOnModelInvalid 'lengthUnits' attribute valueNNNNNNW
L3ExtentUnitsOnModelInvalid 'extentUnits' attribute valueNNNNNNW
AllowedAttributesOnModelInvalid attribute found on the Model objectNNNNNNE
AllowedAttributesOnListOfFuncsInvalid attribute found on the ListOfFunctionDefinitions objectNNNNNNE
AllowedAttributesOnListOfUnitDefsInvalid attribute found on the ListOfUnitDefinitions objectNNNNNNE
AllowedAttributesOnListOfCompsInvalid attribute found on the ListOfCompartments objectNNNNNNE
AllowedAttributesOnListOfSpeciesInvalid attribute found on the ListOfSpecies objectNNNNNNE
AllowedAttributesOnListOfParamsInvalid attribute found on the ListOfParameters objectNNNNNNE
AllowedAttributesOnListOfInitAssignInvalid attribute found on the ListOfInitialAssignments objectNNNNNNE
AllowedAttributesOnListOfRulesInvalid attribute found on the ListOfRules objectNNNNNNE
AllowedAttributesOnListOfConstraintsInvalid attribute found on the ListOfConstraints objectNNNNNNE
AllowedAttributesOnListOfReactionsInvalid attribute found on the ListOfReactions objectNNNNNNE
AllowedAttributesOnListOfEventsInvalid attribute found on the ListOfEvents objectNNNNNNE
FunctionDefMathNotLambdaInvalid expression found in the function definitionNNEEEEE
InvalidApplyCiInLambdaInvalid forward reference in the MathML <apply><ci>...</ci></apply> expressionNNEEENN
RecursiveFunctionDefinitionRecursive function definitions are not permittedNNEEEEE
InvalidCiInLambdaInvalid <ci> reference found inside the <lambda> mathematical formulaNNEEEEE
InvalidFunctionDefReturnTypeA function's return type must be either a number or a BooleanNNEEEEE
OneMathElementPerFuncA FunctionDefinition object must contain one <math> elementNNNNNNE
AllowedAttributesOnFuncInvalid attribute found on the FunctionDefinition objectNNNNNNE
InvalidUnitDefIdInvalid 'id' attribute value for a UnitDefinition objectEEEEEEE
InvalidSubstanceRedefinitionInvalid redefinition of built-in type 'substance'EEEEEEN
InvalidLengthRedefinitionInvalid redefinition of built-in type 'length'WWEEEEN
InvalidAreaRedefinitionInvalid redefinition of built-in type name 'area'WWEEEEN
InvalidTimeRedefinitionInvalid redefinition of built-in type name 'time'EEEEEEN
InvalidVolumeRedefinitionInvalid redefinition of built-in type name 'volume'EEEEEEN
VolumeLitreDefExponentNotOneMust use 'exponent'=1 when defining 'volume' in terms of litresEEEEENN
VolumeMetreDefExponentNot3Must use 'exponent'=3 when defining 'volume' in terms of metresNNEEENN
EmptyListOfUnitsAn empty list of Unit objects is not permitted in a UnitDefinition objectEEEEEEN
InvalidUnitKindInvalid value for the 'kind' attribute of a UnitDefinition objectEEEEEEE
OffsetNoLongerValidUnit attribute 'offset' is not supported in this Level+Version of SBMLNNNEEEN
CelsiusNoLongerValidUnit name 'Celsius' is not defined in this Level+Version of SBMLNNNEEEN
EmptyUnitListElementA ListOfUnits object must not be emptyNNNNNNE
OneListOfUnitsPerUnitDefAt most one ListOfUnits object is allowed inside a UnitDefinition objectNNNNNNE
OnlyUnitsInListOfUnitsOnly Unit, Notes and Annotation objects are allowed in ListOfUnits objectsNNNNNNE
AllowedAttributesOnUnitDefinitionInvalid attribute found on the UnitDefinition objectNNNNNNE
AllowedAttributesOnListOfUnitsInvalid attribute found on the ListOfUnits objectNNNNNNE
AllowedAttributesOnUnitInvalid attribute found on the Unit objectNNNNNNE
ZeroDimensionalCompartmentSizeInvalid use of the 'size' attribute for a zero-dimensional compartmentNNEEEEN
ZeroDimensionalCompartmentUnitsInvalid use of the 'units' attribute for a zero-dimensional compartmentNNEEEEN
ZeroDimensionalCompartmentConstZero-dimensional compartments must be defined to be constantNNEEEEN
UndefinedOutsideCompartmentInvalid value for the 'outside' attribute of a Compartment objectEEEEEEN
RecursiveCompartmentContainmentRecursive nesting of compartments via the 'outside' attribute is not permittedWWWEEEN
ZeroDCompartmentContainmentInvalid nesting of zero-dimensional compartmentsNNWEEEN
Invalid1DCompartmentUnitsInvalid value for the 'units' attribute of a one-dimensional compartmentNNEEEEW
Invalid2DCompartmentUnitsInvalid value for the 'units' attribute of a two-dimensional compartmentNNEEEEW
Invalid3DCompartmentUnitsInvalid value for the 'units' attribute of a three-dimensional compartmentEEEEEEW
InvalidCompartmentTypeRefInvalid value for the 'compartmentType' attribute of a compartmentNNNEEEN
OneDimensionalCompartmentUnitsNo units defined for 1-D compartmentNNNNNNW
TwoDimensionalCompartmentUnitsNo units defined for 2-D compartmentNNNNNNW
ThreeDimensionalCompartmentUnitsNo units defined for 3-D Compartment objectNNNNNNW
AllowedAttributesOnCompartmentInvalid attribute found on Compartment objectNNNNNNE
NoUnitsOnCompartmentNo units defined for Compartment objectNNNNNNW
InvalidSpeciesCompartmentRefInvalid value found for Species 'compartment' attributeEEEEEEE
HasOnlySubsNoSpatialUnitsAttribute 'spatialSizeUnits' must not be set if 'hasOnlySubstanceUnits'='true'NNEENNN
NoSpatialUnitsInZeroDAttribute 'spatialSizeUnits' must not be set if the compartment is zero-dimensionalNNEENNN
NoConcentrationInZeroDAttribute 'initialConcentration' must not be set if the compartment is zero-dimensionalNNEEEEN
SpatialUnitsInOneDInvalid value for 'spatialSizeUnits' attribute of a one-dimensional compartmentNNEENNN
SpatialUnitsInTwoDInvalid value for the 'spatialSizeUnits' attribute of a two-dimensional compartmentNNEENNN
SpatialUnitsInThreeDInvalid value for the 'spatialSizeUnits' attribute of a three-dimensional compartmentNNEENNN
InvalidSpeciesSusbstanceUnitsInvalid value for a Species 'units' attributeEEEEEEW
BothAmountAndConcentrationSetCannot set both 'initialConcentration' and 'initialAmount' attributes simultaneouslyNNEEEEE
NonBoundarySpeciesAssignedAndUsedCannot use a non-boundary species in both reactions and rules simultaneouslyWWEEEEE
NonConstantSpeciesUsedCannot use a constant, non-boundary species as a reactant or productNNEEEEE
InvalidSpeciesTypeRefInvalid value for the 'speciesType' attribute of a speciesNNNEEEN
MultSpeciesSameTypeInCompartmentCannot have multiple species of the same species type in the same compartmentNNNEEEN
MissingSpeciesCompartmentMissing value for the 'compartment' attributeEEEEEEE
SpatialSizeUnitsRemovedAttribute 'spatialSizeUnits' is not supported in this Level+Version of SBMLNNNNEEN
SubstanceUnitsOnSpeciesNo substance units defined for the speciesNNNNNNW
ConversionFactorOnSpeciesInvalid value for the 'conversionFactor' attributeNNNNNNE
AllowedAttributesOnSpeciesInvalid attribute found on Species objectNNNNNNE
InvalidParameterUnitsInvalid value for the 'units' attribute of a Parameter objectEEEEEEE
ParameterUnitsNo units defined for the parameterNNNNNNW
ConversionFactorMustConstantA conversion factor must reference a Parameter object declared to be a constantNNNNNNE
AllowedAttributesOnParameterInvalid attribute found on Parameter objectNNNNNNE
InvalidInitAssignSymbolInvalid value for the 'symbol' attribute of an InitialAssignment objectNNNEEEE
MultipleInitAssignmentsMultiple initial assignments for the same 'symbol' value are not allowedNNNEEEE
InitAssignmentAndRuleForSameIdCannot set a value using both an initial assignment and an assignment rule simultaneouslyNNNEEEE
OneMathElementPerInitialAssignAn InitialAssignment object must contain one <math> elementNNNNNNE
AllowedAttributesOnInitialAssignInvalid attribute found on an InitialAssignment objectNNNNNNE
InvalidAssignRuleVariableInvalid value for the 'variable' attribute of an AssignmentRule objectEEEEEEE
InvalidRateRuleVariableInvalid value for the 'variable' attribute of a RateRule objectEEEEEEE
AssignmentToConstantEntityAn assignment rule cannot assign an entity declared to be constantNNEEEEE
RateRuleForConstantEntityA rate rule cannot assign an entity declared to be constantNNEEEEE
CircularRuleDependencyCircular dependencies involving rules and reactions are not permittedNNNEEEE
OneMathElementPerRuleA rule object must contain one <math> elementNNNNNNE
AllowedAttributesOnAssignRuleInvalid attribute found on an AssignmentRule objectNNNNNNE
AllowedAttributesOnRateRuleInvalid attribute found on a RateRule objectNNNNNNE
AllowedAttributesOnAlgRuleInvalid attribute found on an AlgebraicRule objectNNNNNNE
ConstraintMathNotBooleanA Constraint object's <math> must evaluate to a Boolean valueNNNEEEE
IncorrectOrderInConstraintSubobjects inside the Constraint object are not in the prescribed orderNNNEEEN
ConstraintNotInXHTMLNamespaceA Constraint's Message subobject must be in the XHTML XML namespaceNNNEEEN
ConstraintContainsXMLDeclXML declarations are not permitted within Constraint's Message objectsNNNEEEE
ConstraintContainsDOCTYPEXML DOCTYPE elements are not permitted within Constraint's Message objectsNNNEEEE
InvalidConstraintContentInvalid content for a Constraint object's Message objectNNNEEEN
OneMathElementPerConstraintA Constraint object must contain one <math> elementNNNNNNE
OneMessageElementPerConstraintA Constraint object must contain one Message subobjectNNNNNNE
AllowedAttributesOnConstraintInvalid attribute found on Constraint objectNNNNNNE
NoReactantsOrProductsCannot have a reaction with neither reactants nor productsEEEEEEE
IncorrectOrderInReactionSubobjects inside the Reaction object are not in the prescribed orderEEEEEEN
EmptyListInReactionReaction components, if present, cannot be emptyEEEEEEE
InvalidReactantsProductsListInvalid object found in the list of reactants or productsEEEEEEE
InvalidModifiersListInvalid object found in the list of modifiersNNEEEEE
OneSubElementPerReactionA Reaction object can only contain one of each allowed type of objectNNNNNNE
CompartmentOnReactionInvalid value for the Reaction 'compartment' attributeNNNNNNE
AllowedAttributesOnReactionInvalid attribute for a Reaction objectNNNNNNE
InvalidSpeciesReferenceInvalid 'species' attribute value in SpeciesReference objectEEEEEEE
BothStoichiometryAndMathThe 'stoichiometry' attribute and StoichiometryMath subobject are mutually exclusiveNNEEEEN
AllowedAttributesOnSpeciesReferenceInvalid attribute found on the SpeciesReference objectNNNNNNE
AllowedAttributesOnModifierInvalid attribute found on the ModifierSpeciesReference objectNNNNNNE
UndeclaredSpeciesRefUnknown species referenced in the kinetic law <math> formulaWWEEEEE
IncorrectOrderInKineticLawIncorrect ordering of components in the KineticLaw objectNNEEEEN
EmptyListInKineticLawThe list of parameters, if present, cannot be emptyEEEEEEE
NonConstantLocalParameterParameters local to a KineticLaw object must have a 'constant' attribute value of 'true'NNWEEEN
SubsUnitsNoLongerValidAttribute 'substanceUnits' is not supported in this Level+Version of SBMLNNNEEEN
TimeUnitsNoLongerValidAttribute 'timeUnits' is not supported in this Level+Version of SBMLNNNEEEN
OneListOfPerKineticLawOnly one ListOfLocalParameters object is permitted within a KineticLaw objectNNNNNNE
OnlyLocalParamsInListOfLocalParamsOnly LocalParameter, Notes and Annotation objects are allowed in ListOfLocalParameter objectsNNNNNNE
AllowedAttributesOnListOfLocalParamInvalid attribute found on the ListOfLocalParameters objectNNNNNNE
OneMathPerKineticLawOnly one <math> element is allowed in a KineticLaw objectNNEEEEE
UndeclaredSpeciesInStoichMathUnknown species referenced in the StoichiometryMath object's <math> formulaNNWEEEN
AllowedAttributesOnKineticLawInvalid attribute found on the KineticLaw objectNNNNNNE
AllowedAttributesOnListOfSpeciesRefInvalid attribute found on the ListOfSpeciesReferences objectNNNNNNE
AllowedAttributesOnListOfModsInvalid attribute found on the ListOfModifiers objectNNNNNNE
AllowedAttributesOnLocalParameterInvalid attribute found on the LocalParameter objectNNNNNNE
MissingTriggerInEventThe Event object is missing a Trigger subobjectNNEEEEE
TriggerMathNotBooleanA Trigger object's <math> expression must evaluate to a Boolean valueNNEEEEE
MissingEventAssignmentThe Event object is missing an EventAssignment subobjectNNEEEEE
TimeUnitsEventUnits referenced by 'timeUnits' attribute are not compatible with units of timeNNEENNN
IncorrectOrderInEventIncorrect ordering of components in Event objectNNEEEEN
ValuesFromTriggerTimeNeedDelayAttribute 'useValuesFromTriggerTime'='false', but the Event object does not define a delayNNNNNEN
DelayNeedsValuesFromTriggerTimeThe use of a Delay object requires the Event attribute 'useValuesFromTriggerTime'NNNNNNN
OneMathPerTriggerA Trigger object must have one <math> elementNNNNNNE
OneMathPerDelayA Delay object must have one <math> elementNNNNNNE
InvalidEventAssignmentVariableInvalid 'variable' attribute value in Event objectNNEEEEE
EventAssignmentForConstantEntityAn EventAssignment object cannot assign to a component having attribute 'constant'='true'NNWEEEE
OneMathPerEventAssignmentAn EventAssignment object must have one <math> elementNNNNNNE
AllowedAttributesOnEventAssignmentInvalid attribute found on the EventAssignment objectNNNNNNE
OnlyOneDelayPerEventAn Event object can only have one Delay subobjectNNNNNNE
OneListOfEventAssignmentsPerEventAn Event object can only have one ListOfEventAssignments subobjectNNNNNNE
OnlyEventAssignInListOfEventAssignOnly EventAssignment, Notes and Annotation objects are allowed in ListOfEventAssignmentsNNNNNNE
AllowedAttributesOnListOfEventAssignInvalid attribute found on the ListOfEventAssignments objectNNNNNNE
AllowedAttributesOnEventInvalid attribute found on the Event objectNNNNNNE
AllowedAttributesOnTriggerInvalid attribute found on the Trigger objectNNNNNNE
AllowedAttributesOnDelayInvalid attribute found on the Delay objectNNNNNNE
PersistentNotBooleanThe Trigger attribute 'persistent' must evaluate to a Boolean valueNNNNNNE
InitialValueNotBooleanThe Trigger attribute 'initialValue' must evaluate to a Boolean valueNNNNNNE
OnlyOnePriorityPerEventAn Event object can only have one Priority subobjectNNNNNNE
OneMathPerPriorityA Priority object must have one <math> elementNNNNNNE
AllowedAttributesOnPriorityInvalid attribute found on the Priority objectNNNNNNE
GeneralWarningNotSpecifiedUnknown errorNNNNNNN
CompartmentShouldHaveSizeIt's best to define a size for every compartment in a modelNNWWWWW
SpeciesShouldHaveValueIt's best to define an initial amount or initial concentration for every species in a modelNNWWWWW
ParameterShouldHaveUnitsIt's best to declare units for every parameter in a modelWWWWWWW
LocalParameterShadowsIdLocal parameters defined within a kinetic law shadow global object symbolsWWWWWWW
CannotConvertToL1V1Cannot convert to SBML Level 1 Version 1NEEEEEE
NoEventsInL1SBML Level 1 does not support eventsNNEEEEE
NoFunctionDefinitionsInL1SBML Level 1 does not support function definitionsNNEEEEE
NoConstraintsInL1SBML Level 1 does not support constraintsNNNWWWW
NoInitialAssignmentsInL1SBML Level 1 does not support initial assignmentsNNNEEEE
NoSpeciesTypesInL1SBML Level 1 does not support species typesNNNWWWN
NoCompartmentTypeInL1SBML Level 1 does not support compartment typesNNNWWWN
NoNon3DCompartmentsInL1SBML Level 1 only supports three-dimensional compartmentsNNEEEEE
NoFancyStoichiometryMathInL1SBML Level 1 does not support non-integer nor non-rational stoichiometry formulasNNEEEEE
NoNonIntegerStoichiometryInL1SBML Level 1 does not support non-integer 'stoichiometry' attribute valuesNNEEEEE
NoUnitMultipliersOrOffsetsInL1SBML Level 1 does not support multipliers or offsets in unit definitionsNNEEEEE
SpeciesCompartmentRequiredInL1In SBML Level 1, a value for 'compartment' is mandatory in species definitionsNNEEEEE
NoSpeciesSpatialSizeUnitsInL1SBML Level 1 does not support species 'spatialSizeUnits' settingsNNEEEEN
NoSBOTermsInL1SBML Level 1 does not support the 'sboTerm' attributeNNNWWWW
StrictUnitsRequiredInL1SBML Level 1 requires strict unit consistencyNNNNNWW
ConversionFactorNotInL1SBML Level 1 does not support the 'conversionFactor' attributeNNNNNNE
CompartmentNotOnL1ReactionSBML Level 1 does not support the 'compartment' attribute on Reaction objectsNNNNNNW
ExtentUnitsNotSubstanceUnits of extent must be compatible with units of substanceNNNNNNE
NoConstraintsInL2v1SBML Level 2 Version 1 does not support Constraint objectsNNNWWWW
NoInitialAssignmentsInL2v1SBML Level 2 Version 1 does not support InitialAssignment objectsNNNEEEE
NoSpeciesTypeInL2v1SBML Level 2 Version 1 does not support SpeciesType objectsNNNWWWN
NoCompartmentTypeInL2v1SBML Level 2 Version 1 does not support CompartmentType objectsNNNWWWN
NoSBOTermsInL2v1SBML Level 2 Version 1 does not support the 'sboTerm' attributeNNNWWWW
NoIdOnSpeciesReferenceInL2v1SBML Level 2 Version 1 does not support the 'id' attribute on SpeciesReference objectsNNNWWWW
NoDelayedEventAssignmentInL2v1SBML Level 2 Version 1 does not support the 'useValuesFromTriggerTime' attributeNNNNNEE
StrictUnitsRequiredInL2v1SBML Level 2 Version 1 requires strict unit consistencyNNNNNWW
IntegerSpatialDimensionsSBML Level 2 Version 1 requires that compartments have spatial dimensions of 0-3NNNNNNE
StoichiometryMathNotYetSupportedConversion to StoichiometryMath objects not yet supportedNNNNNNN
PriorityLostFromL3SBML Level 2 Version 1 does not support priorities on Event objectsNNNNNNW
NonPersistentNotSupportedSBML Level 2 Version 1 does not support the 'persistent' attribute on Trigger objectsNNNNNNE
InitialValueFalseEventNotSupportedSBML Level 2 Version 1 does not support the 'initialValue' attribute on Trigger objectsNNNNNNE
SBOTermNotUniversalInL2v2The 'sboTerm' attribute is invalid for this component in SBML Level 2 Version 2NNNNWWW
NoUnitOffsetInL2v2This Level+Version of SBML does not support the 'offset' attribute on Unit objectsNNENNNN
NoKineticLawTimeUnitsInL2v2This Level+Version of SBML does not support the 'timeUnits' attribute on KineticLaw objectsEEENNNN
NoKineticLawSubstanceUnitsInL2v2This Level+Version of SBML does not support the 'substanceUnits' attribute on KineticLaw objectsEEENNNN
NoDelayedEventAssignmentInL2v2This Level+Version of SBML does not support the 'useValuesFromTriggerTime' attributeNNNNNEE
ModelSBOBranchChangedBeyondL2v2The allowable 'sboTerm' attribute values for Model objects differ for this SBML Level+VersionNNNNNEE
StrictUnitsRequiredInL2v2SBML Level 2 Version 2 requires strict unit consistencyNNNNNWW
StrictSBORequiredInL2v2SBML Level 2 Version 2 requires strict SBO term consistencyNNNNNWW
DuplicateAnnotationInvalidInL2v2Duplicate top-level annotations are invalid in SBML Level 2 Version 2WWWNNNN
NoUnitOffsetInL2v3This Level+Version of SBML does not support the 'offset' attribute on Unit objectsNNENNNN
NoKineticLawTimeUnitsInL2v3This Level+Version of SBML does not support the 'timeUnits' attribute on KineticLaw objectsEEENNNN
NoKineticLawSubstanceUnitsInL2v3This Level+Version of SBML does not support the 'substanceUnits' attribute on KineticLaw objectsEEENNNN
NoSpeciesSpatialSizeUnitsInL2v3This Level+Version of SBML does not support the 'spatialSizeUnit' attribute on Species objectsNNEENNN
NoEventTimeUnitsInL2v3This Level+Version of SBML does not support the 'timeUnits' attribute on Event objectsNNEENNN
NoDelayedEventAssignmentInL2v3This Level+Version of SBML does not support the 'useValuesFromTriggerTime' attributeNNNNNEE
ModelSBOBranchChangedBeyondL2v3The allowable 'sboTerm' attribute values for Model objects differ for this SBML Level+VersionNNNNNEE
StrictUnitsRequiredInL2v3SBML Level 2 Version 3 requires strict unit consistencyNNNNNWW
StrictSBORequiredInL2v3SBML Level 2 Version 3 requires strict SBO term consistencyNNNNNWW
DuplicateAnnotationInvalidInL2v3Duplicate top-level annotations are invalid in SBML Level 2 Version 3WWWNNNN
NoUnitOffsetInL2v4This Level+Version of SBML does not support the 'offset' attribute on Unit objectsNNENNNN
NoKineticLawTimeUnitsInL2v4This Level+Version of SBML does not support the 'timeUnits' attribute on KineticLaw objectsEEENNNN
NoKineticLawSubstanceUnitsInL2v4This Level+Version of SBML does not support the 'substanceUnits' attribute on KineticLaw objectsEEENNNN
NoSpeciesSpatialSizeUnitsInL2v4This Level+Version of SBML does not support the 'spatialSizeUnit' attribute on Species objectsNNEENNN
NoEventTimeUnitsInL2v4This Level+Version of SBML does not support the 'timeUnits' attribute on Event objectsNNEENNN
ModelSBOBranchChangedInL2v4The allowable 'sboTerm' attribute values for Model objects differ for this SBML Level+VersionNNNEENN
DuplicateAnnotationInvalidInL2v4Duplicate top-level annotations are invalid in SBML Level 2 Version 4WWWNNNN
NoSpeciesTypeInL3v1SBML Level 3 Version 1 does not support SpeciesType objectsNNNWWWN
NoCompartmentTypeInL3v1SBML Level 3 Version 1 does not support CompartmentType objectsNNNWWWN
NoUnitOffsetInL3v1This Level+Version of SBML does not support the 'offset' attribute on Unit objectsNNENNNN
NoKineticLawTimeUnitsInL3v1This Level+Version of SBML does not support the 'timeUnits' attribute on KineticLaw objectsEEENNNN
NoKineticLawSubstanceUnitsInL3v1This Level+Version of SBML does not support the 'substanceUnits' attribute on KineticLaw objectsEEENNNN
NoSpeciesSpatialSizeUnitsInL3v1This Level+Version of SBML does not support the 'spatialSizeUnit' attribute on Species objectsNNEENNN
NoEventTimeUnitsInL3v1This Level+Version of SBML does not support the 'timeUnits' attribute on Event objectsNNEENNN
ModelSBOBranchChangedInL3v1The allowable 'sboTerm' attribute values for Model objects differ for this SBML Level+VersionNNNEENN
DuplicateAnnotationInvalidInL3v1Duplicate top-level annotations are invalid in SBML Level 3 Version 1WWWNNNN
NoCompartmentOutsideInL3v1This Level+Version of SBML does not support the 'outside' attribute on Compartment objectsWWWWWWN
NoStoichiometryMathInL3v1This Level+Version of SBML does not support the StoichiometryMath objectNNEEEEN
InvalidSBMLLevelVersionUnknown Level+Version combination of SBMLEEEEEEE
AnnotationNotesNotAllowedLevel1Annotation objects on the SBML container element are not permitted in SBML Level 1EENNNNN
InvalidRuleOrderingInvalid ordering of rulesEEENNNN
RequiredPackagePresentThe SBML document requires an SBML Level 3 package unavailable in this softwareNNNNNNE
UnrequiredPackagePresentThe SBML document uses an SBML Level 3 package unavailable in this softwareNNNNNNW
SubsUnitsAllowedInKLDisallowed value for attribute 'substanceUnits' on KineticLaw objectEEENNNN
TimeUnitsAllowedInKLDisallowed value for attribute 'timeUnits' on KineticLaw objectEEENNNN
FormulaInLevel1KLOnly predefined functions are allowed in SBML Level 1 formulasEENNNNN
TimeUnitsRemovedThis Level+Version of SBML does not support the 'timeUnits' attribute on Event objectsNNNNEEE
BadMathMLInvalid MathML expressionNNEEEEE
FailedMathMLReadOfDoubleMissing or invalid floating-point number in MathML expressionNNEEEEE
FailedMathMLReadOfIntegerMissing or invalid integer in MathML expressionNNEEEEE
FailedMathMLReadOfExponentialMissing or invalid exponential expression in MathMLNNEEEEE
FailedMathMLReadOfRationalMissing or invalid rational expression in MathMLNNEEEEE
BadMathMLNodeTypeInvalid MathML elementNNEEEEE
NoTimeSymbolInFunctionDefUse of <csymbol> for 'time' not allowed within FunctionDefinition objectsNNWEEEE
NoBodyInFunctionDefThere must be a <lambda> body within the <math> element of a FunctionDefinition objectNNEEEEE
UndeclaredUnitsMissing unit declarations on parameters or literal numbers in expressionWWWWWWW
UndeclaredTimeUnitsL3Unable to verify consistency of units: the unit of time has not been declaredNNNNNNW
UndeclaredExtentUnitsL3Unable to verify consistency of units: the units of reaction extent have not been declaredNNNNNNW
UndeclaredObjectUnitsL3Unable to verify consistency of units: encountered a model entity with no declared unitsNNNNNNW
UnrecognisedSBOTermUnrecognized 'sboTerm' attribute valueNNNWWWW
ObseleteSBOTermObsolete 'sboTerm' attribute valueNNNWWWW
IncorrectCompartmentSpatialDimensionsIn SBML Level 1, only three-dimensional compartments are allowedEENNNNN
CompartmentTypeNotValidAttributeCompartmentType objects are not available in this Level+Version of SBMLEEENNNE
ConstantNotValidAttributeThis Level+Version of SBML does not support the 'constant' attribute on this componentEENNNNN
MetaIdNotValidAttributeAttribute 'metaid' is not available in SBML Level 1EENNNNN
SBOTermNotValidAttributeBeforeL2V3The 'sboTerm' attribute is not available on this component before SBML Level 2 Version 3EEEENNN
InvalidL1CompartmentUnitsInvalid units for a compartment in SBML Level 1EENNNNN
L1V1CompartmentVolumeReqdIn SBML Level 1, a compartment's volume must be specifiedENNNNNN
CompartmentTypeNotValidComponentCompartmentType objects are not available in this Level+Version of SBMLEEENNNE
ConstraintNotValidComponentConstraint objects are not available in this Level+Version of SBMLEEENNNN
EventNotValidComponentEvent objects are not available in this Level+Version of SBMLEENNNNN
SBOTermNotValidAttributeBeforeL2V2The 'sboTerm' attribute is invalid for this component before Level 2 Version 2EEENNNN
FuncDefNotValidComponentFunctionDefinition objects are not available in this Level+Version of SBMLEENNNNN
InitialAssignNotValidComponentInitialAssignment objects are not available in this Level+Version of SBMLEEENNNN
VariableNotValidAttributeAttribute 'variable' is not available on this component in this Level+Version of SBMLEEEEEEE
UnitsNotValidAttributeAttribute 'units' is not available on this component in this Level+Version of SBMLEEEEEEE
ConstantSpeciesNotValidAttributeAttribute 'constant' is not available on Species objects in SBML Level 1EENNNNN
SpatialSizeUnitsNotValidAttributeAttribute 'spatialSizeUnits' is not available on Species objects in SBML Level 1EENNNNN
SpeciesTypeNotValidAttributeAttribute 'speciesType' is not available on Species objects in SBML Level 1EEENNNE
HasOnlySubsUnitsNotValidAttributeAttribute 'hasOnlySubstanceUnits' is not available on Species objects in SBML Level 1EENNNNN
IdNotValidAttributeAttribute 'id' is not available on SpeciesReference objects in SBML Level 1EEENNNN
NameNotValidAttributeAttribute 'name' is not available on SpeciesReference objects in SBML Level 1EEENNNN
SpeciesTypeNotValidComponentThe SpeciesType object is not supported in SBML Level 1EEENNNE
StoichiometryMathNotValidComponentThe StoichiometryMath object is not supported in SBML Level 1EENNNNE
MultiplierNotValidAttributeAttribute 'multiplier' on Unit objects is not supported in SBML Level 1EENNNNN
OffsetNotValidAttributeAttribute 'offset' on Unit objects is only available in SBML Level 2 Version 1EENNNNN
L3SpatialDimensionsUnsetNo value given for 'spatialDimensions' attribute; assuming a value of 3NNNNNNW
PackageConversionNotSupportedConversion of SBML Level 3 package constructs is not yet supportedEEEEEEE
InvalidTargetLevelVersionThe requested SBML Level/Version combination is not known to existEEEEEEE
L3NotSupportedSBML Level 3 is not yet supportedEEEEEEE

Category codes associated with SBMLError objects

As discussed above, each SBMLError object contains a value for a category identifier, describing the type of issue that the SBMLError object represents. The category can be retrieved from an SBMLError object using the method SBMLError.getCategory(). The following table lists each possible value and a brief description of its meaning.

As is the case with the error codes, in the libSBML Python language interface, the category identifiers are currently implemented as static integer constants defined in the interface class libsbml.

The following table lists each possible value and a brief description of its meaning.

Enumerator Meaning
LIBSBML_CAT_SBMLGeneral error not falling into another category below.
LIBSBML_CAT_SBML_L1_COMPATCategory of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model from SBML Level 2 to SBML Level 1.
LIBSBML_CAT_SBML_L2V1_COMPATCategory of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model to SBML Level 2 Version 1.
LIBSBML_CAT_SBML_L2V2_COMPATCategory of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model to SBML Level 2 Version 2.
LIBSBML_CAT_GENERAL_CONSISTENCYCategory of errors that can occur while validating general SBML constructs. With respect to the SBML specification, these concern failures in applying the validation rules numbered 2xxxx in the Level 2 Versions 2–4 and Level 3 Version 1 specifications.
LIBSBML_CAT_IDENTIFIER_CONSISTENCYCategory of errors that can occur while validating symbol identifiers in a model. With respect to the SBML specification, these concern failures in applying the validation rules numbered 103xx in the Level 2 Versions 2–4 and Level 3 Version 1 specifications.
LIBSBML_CAT_UNITS_CONSISTENCYCategory of errors that can occur while validating the units of measurement on quantities in a model. With respect to the SBML specification, these concern failures in applying the validation rules numbered 105xx in the Level 2 Versions 2–4 and Level 3 Version 1 specifications.
LIBSBML_CAT_MATHML_CONSISTENCYCategory of errors that can occur while validating MathML formulas in a model. With respect to the SBML specification, these concern failures in applying the validation rules numbered 102xx in the Level 2 Versions 2–4 and Level 3 Version 1 specifications.
LIBSBML_CAT_SBO_CONSISTENCYCategory of errors that can occur while validating SBO identifiers in a model. With respect to the SBML specification, these concern failures in applying the validation rules numbered 107xx in the Level 2 Versions 2–4 and Level 3 Version 1 specifications.
LIBSBML_CAT_OVERDETERMINED_MODELError in the system of equations in the model: the system is overdetermined, therefore violating a tenet of proper SBML. With respect to the SBML specification, this is validation rule #10601 in the SBML Level 2 Versions 2–4 and Level 3 Version 1 specifications.
LIBSBML_CAT_SBML_L2V3_COMPATCategory of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model to SBML Level 2 Version 3.
LIBSBML_CAT_MODELING_PRACTICECategory of warnings about recommended good practices involving SBML and computational modeling. (These are tests performed by libSBML and do not have equivalent SBML validation rules.)
LIBSBML_CAT_INTERNAL_CONSISTENCYCategory of errors that can occur while validating libSBML's internal representation of SBML constructs. (These are tests performed by libSBML and do not have equivalent SBML validation rules.)
LIBSBML_CAT_SBML_L2V4_COMPATCategory of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model to SBML Level 2 Version 4.
LIBSBML_CAT_SBML_L3V1_COMPAT

Category of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model to SBML Level 3 Version 1.

Severity codes associated with SBMLError objects

In libSBML version 5.3.0 there are no additional severity codes beyond those defined by XMLError. They are implemented as static integer constants defined in the interface class libsbml, and have names beginning with LIBSBML_SEV_.

Public Member Functions

def getCategory
def getCategoryAsString
def getColumn
def getErrorId
def getLine
def getMessage
def getSeverity
def getSeverityAsString
def getShortMessage
def getStandardMessage
def isError
def isFatal
def isInfo
def isInternal
def isSystem
def isValid
def isWarning
def isXML
def setColumn
def setLine

Member Function Documentation

def libsbml.XMLError.getCategory (   self  )  [inherited]

Python method signature(s):

getCategory()    long

Returns the category of this error.

XMLError defines an enumeration of category codes for the XML layer. Applications that build on XMLError by subclassing it may add their own categories with numbers higher than those in the predefined set of category codes.

Categories can be used to partition errors into distinct groups. Among other things, this can be used to prevent id conflicts by uniquely identifying an XMLError by both id and category.

Returns:
the category of this XMLError.
See also:
getSeverity()
getCategoryAsString()
def libsbml.XMLError.getCategoryAsString (   self  )  [inherited]

Python method signature(s):

getCategoryAsString()    string

Returns a string describing the category of this error.

XMLError defines an enumeration of category codes for the XML layer. Applications that build on XMLError by subclassing it may add their own categories with numbers higher than those in the predefined set of category codes.

Categories can be used to partition errors into distinct groups. Among other things, this can be used to prevent id conflicts by uniquely identifying an XMLError by both id and category.

Returns:
string representing the category of this XMLError.
See also:
getCategory()
getSeverityAsString()
def libsbml.XMLError.getColumn (   self  )  [inherited]

Python method signature(s):

getColumn()    long

Returns the column number in the XML input near where the error, warning or other diagnostic occurred.

We say 'near where the problem occurred', because many factors affect how accurate the line/column information ultimately is. For example, different XML parsers have different conventions for which line and column number they report for a particular problem (which in turn makes a difference when a problem involves an opening XML tag on one line and a closing tag on another line). In some situations, some parsers report invalid line and/or column numbers altogether. If this occurs, the line and/or column number in the XMLError object will be set to the the value of the maximum longeger declared for SBML. (We use this rather than a machine specific constant as it guarantees uniformity.) The probability that a true line or column number in an SBML model would equal this value is vanishingly small; thus, if an application encounters these values in an XMLError object, it can assume no valid line/column number could be provided by libSBML in that situation.

Returns:
the column number
See also:
getLine()
def libsbml.XMLError.getErrorId (   self  )  [inherited]

Python method signature(s):

getErrorId()    long

Returns the identifier of this error.

Returns:
the error code for this error.
See also:
getMessage()
getShortMessage()
getCategory()
getSeverity()
def libsbml.XMLError.getLine (   self  )  [inherited]

Python method signature(s):

getLine()    long

Returns the line number in the XML input near where the error, warning or other diagnostic occurred.

We say 'near where the problem occurred', because many factors affect how accurate the line/column information ultimately is. For example, different XML parsers have different conventions for which line and column number they report for a particular problem (which in turn makes a difference when a problem involves an opening XML tag on one line and a closing tag on another line). In some situations, some parsers report invalid line and/or column numbers altogether. If this occurs, the line and/or column number in the XMLError object will be set to the the value of the maximum longeger declared for SBML. (We use this rather than a machine specific constant as it guarantees uniformity.) The probability that a true line or column number in an SBML model would equal this value is vanishingly small; thus, if an application encounters these values in an XMLError object, it can assume no valid line/column number could be provided by libSBML in that situation.

Returns:
the line number
See also:
getColumn()
def libsbml.XMLError.getMessage (   self  )  [inherited]

Python method signature(s):

getMessage()    string

Returns the message text of this error.

The message associated with an error object describes the nature of the problem. The message returned by this method is generally longer and clearer than the message returned by XMLError.getShortMessage(), but not in all cases.

Callers may use XMLError.getCategory() and XMLError.getSeverity() to obtain additional information about the nature and severity of the problem.

Returns:
the message text
See also:
getErrorId()
getShortMessage()
getCategory()
getSeverity()
def libsbml.XMLError.getSeverity (   self  )  [inherited]

Python method signature(s):

getSeverity()    long

Returns the severity of this error.

XMLError defines an enumeration of severity codes for the XML layer. Applications that build on XMLError by subclassing it may add their own severity codes with numbers higher than those in the predefined set of severity codes.

Returns:
the severity of this XMLError.
See also:
getSeverityAsString()
getCategory()
def libsbml.XMLError.getSeverityAsString (   self  )  [inherited]

Python method signature(s):

getSeverityAsString()    string

Returns a string describing the severity level of this error.

XMLError defines an enumeration of severity codes for the XML layer. Applications that build on XMLError by subclassing it may add their own severity codes with numbers higher than those in the predefined set of severity codes.

Returns:
string representing the severity of this XMLError.
See also:
getSeverity()
getCategoryAsString()
def libsbml.XMLError.getShortMessage (   self  )  [inherited]

Python method signature(s):

getShortMessage()    string

Returns a brief message for this error.

This is an alternative error message that, in general, is as short as the authors could make it. However, brevity is often inversely proportional to clarity, so this short message may not be sufficiently informative to understand the nature of the error. Calling applications may wish to check XMLError.getMessage() in addition or instead.

Returns:
the short error message text
See also:
getErrorId()
getMessage()
getCategory()
getSeverity()
def libsbml.XMLError.getStandardMessage (   args  )  [inherited]

Python method signature(s):

getStandardMessage(int code)    string

Returns a copy of the message string associated with the given predefined XMLError code.

Parameters:
code the error code whose message is sought; it must be a predefined value from the set of predefined error identifiers.
def libsbml.XMLError.isError (   self  )  [inherited]

Python method signature(s):

isError()    bool

Predicate returning true or false depending on whether this error is a significant error.

This is equivalent to obtaining the severity code from an XMLError object (via XMLError.getSeverity()) and then comparing it to the value LIBSBML_SEV_ERROR from the set of predefined severity codes.

Returns:
true if this error is an error, false otherwise.
See also:
isInfo()
isWarning()
isFatal()
def libsbml.XMLError.isFatal (   self  )  [inherited]

Python method signature(s):

isFatal()    bool

Predicate returning true or false depending on whether this error is a fatal run-time error.

This is equivalent to obtaining the severity code from an XMLError object (via XMLError.getSeverity()) and then comparing it to the value LIBSBML_SEV_FATAL from the set of predefined severity codes.

Returns:
true if this error is a fatal error, false otherwise.
See also:
isInfo()
isWarning()
isError()
def libsbml.XMLError.isInfo (   self  )  [inherited]

Python method signature(s):

isInfo()    bool

Predicate returning true or false depending on whether this error object is for information purposes only.

This is equivalent to obtaining the severity code from an XMLError object (via XMLError.getSeverity()) and then comparing it to the value LIBSBML_SEV_INFO from the set of predefined severity codes.

Returns:
true if this XMLError is for informational purposes only, false otherwise.
See also:
isWarning()
isError()
isFatal()
def libsbml.XMLError.isInternal (   self  )  [inherited]

Python method signature(s):

isInternal()    bool

Predicate returning true or false depending on whether this error resulted from an internal program error.

This is equivalent to obtaining the category identifier from an XMLError object (via XMLError.getCategory()) and then comparing it to the value LIBSBML_CAT_INTERNAL from the set of predefined category codes.

Returns:
true or false
See also:
isSystem()
isXML()
def libsbml.XMLError.isSystem (   self  )  [inherited]

Python method signature(s):

isSystem()    bool

Predicate returning true or false depending on whether this error was generated by the operating system.

This is equivalent to obtaining the category identifier from an XMLError object (via XMLError.getCategory()) and then comparing it to the value LIBSBML_CAT_SYSTEM from the set of predefined category codes.

Returns:
true or false
See also:
isInternal()
isXML()
def libsbml.XMLError.isValid (   self  )  [inherited]

Python method signature(s):

isValid()    bool

Predicate returning true or false depending on whether this error resulted from a problem or whether it was logged as an unknown error.

This is equivalent to obtaining the error identifier from an XMLError object (via XMLError.getErrorId()) and then comparing it to the value XMLUnknownError or UnknownError from the set of predefined error codes.

Returns:
true or false
def libsbml.XMLError.isWarning (   self  )  [inherited]

Python method signature(s):

isWarning()    bool

Predicate returning true or false depending on whether this error object is a warning.

This is equivalent to obtaining the severity code from an XMLError object (via XMLError.getSeverity()) and then comparing it to the value LIBSBML_SEV_WARNING from the set of predefined severity codes.

Returns:
true if this error is a warning, false otherwise.
See also:
isInfo()
isError()
isFatal()
def libsbml.XMLError.isXML (   self  )  [inherited]

Python method signature(s):

isXML()    bool

Predicate returning true or false depending on whether this error resulted from a problem in the XML input (e.g., an XML syntax error).

This is equivalent to obtaining the category identifier from an XMLError object (via XMLError.getCategory()) and then comparing it to the value LIBSBML_CAT_XML from the set of predefined category codes.

Returns:
true or false
See also:
isInternal()
isSystem()
def libsbml.XMLError.setColumn (   self,
  args 
) [inherited]

Python method signature(s):

setColumn(long column)    int

Sets the column number where this error occurred.

Parameters:
column a long integer, the column number to set.
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
See also:
setLine()
def libsbml.XMLError.setLine (   self,
  args 
) [inherited]

Python method signature(s):

setLine(long line)    int

Sets the line number where this error occurred.

Parameters:
line a long integer, the line number to set.
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
See also:
setColumn()



HTML documentation generated on Tue Dec 20 01:39:55 2011 using Doxygen 1.6.3.