Next: 9.3.8 Unsupported features
Up: 9.3 Predicate Reference
Previous: 9.3.6 External Entities
Contents
Index
Exceptions are generated by the parser in two cases. The first case is when
the user specifies wrong input. For example when specifying
load_structure( string('<m></m>'), Document, [line(xyz)], Warn)
The string xyz is not in the domain of line. Hence in this
case a domain error exception will be thrown.
Exceptions are generated when XML being parsed is not well formed. For
example if the input XML contains
'<m></m1>'
exceptions will be thrown.
In both cases the format of the exception is
error( sgml( error term), error message)
warning( sgml( warning term), warning message)
where error term or warning term can be of the form
- pointer to the parser instance,
- line at which error occurred,
- error code.
- functor(argument), where functor and argument
depend on the type of exception raised. For example,
-
- resource-error(no-memory) -- if memory is unavailable
-
- permission-error(file-name) -- no permission to read a file
-
- A system-error(description) -- internal system error
-
- type-error(expected,actual) -- data type error
-
- domain-error(functor,offending-value) -- the offending
value is not in the domain of the functor. For instance,
in load_structure( string('<m></m>'), Document, [line(xyz)], Warn),
xyz is not in the domain of line.
-
- existence-error(resource) -- resource does not exist
-
- limit-exceeded(limit,maxval) -- value exceeds the limit.
Next: 9.3.8 Unsupported features
Up: 9.3 Predicate Reference
Previous: 9.3.6 External Entities
Contents
Index
Terrance Swift
2007-10-06