Saxon.Api
Class Error
-
public class Error
The Saxon.Api.Error
class contains information about an error detected during
compilation or execution of a stylesheet, query, XPath expression, or schema. Note
that this class is not an exception (though in some cases it may wrap an exception);
errors in schemas or stylesheets are considered as normal events and do not cause
termination of processing, so they are not delivered as exceptions.
The constructor for this class is internal; instances of this class can be created internally by SaxonCS, but not by user application code.
Property Summary |
|
---|---|
Exception | Cause The underlying cause. This many be null. |
QName | ErrorCode The error code (if any) |
HostLanguage | HostLanguage Property to get the host language where this error originates from. |
bool | IsAlreadyReported Property indicating whether this static error has already been reported. |
bool | IsStaticError
Property to check if this error is a |
bool | IsTypeError Property which indicates whether this condition is a type error. |
bool | IsWarning This property indicates whether the error is to be treated as a warning condition. |
Location | Location The location of the error (typically identifying a module of a schema, query, or stylesheet, and a line and column number within that module). |
string | Message The error message |
string | TerminationMessage
Property to indicate that this error is to be treated as fatal, and if so,
to supply a message that will be used on termination.
Execution will be abandoned after reporting this error. This method may be called
by an |
Method Summary |
|
---|---|
Error | AsWarning () Return an equivalent error condition, to be treated as a warning. The original error is not changed. |
Property Detail
HostLanguage
Property to get the host language where this error originates from.
IsAlreadyReported
Property indicating whether this static error has already been reported.
IsTypeError
Property which indicates whether this condition is a type error.
IsWarning
This property indicates whether the error is to be treated as a warning condition.
Location
The location of the error (typically identifying a module of a schema, query, or stylesheet, and a line and column number within that module).
TerminationMessage
Property to indicate that this error is to be treated as fatal, and if so,
to supply a message that will be used on termination.
Execution will be abandoned after reporting this error. This method may be called
by an ErrorReporter
, for example if the error is considered so severe that further processing
is not worthwhile, or if too many errors have been signalled. There is no absolute
guarantee that
setting this property will cause execution to be abandoned.
The property can also be used to ask whether this error is to be treated as fatal.
Return an equivalent error condition, to be treated as a warning. The original error is not changed.