Movatterモバイル変換


[0]ホーム

URL:


Up one LevelPython Library ReferenceContentsModule IndexIndex


8.10.4 ErrorHandler Objects

Objects with this interface are used to receive error and warninginformation from theXMLReader. If you create an object thatimplements this interface, then register the object with yourXMLReader, the parser will call the methods in your object toreport all warnings and errors. There are three levels of errorsavailable: warnings, (possibly) recoverable errors, and unrecoverableerrors. All methods take aSAXParseException as the onlyparameter. Errors and warnings may be converted to an exception byraising the passed-in exception object.

error(exception)
Called when the parser encounters a recoverable error. If this method does not raise an exception, parsing may continue, but further document information should not be expected by the application. Allowing the parser to continue may allow additional errors to be discovered in the input document.

fatalError(exception)
Called when the parser encounters an error it cannot recover from; parsing is expected to terminate when this method returns.

warning(exception)
Called when the parser presents minor warning information to the application. Parsing is expected to continue when this method returns, and document information will continue to be passed to the application. Raising an exception in this method will cause parsing to end.


Up one LevelPython Library ReferenceContentsModule IndexIndex

Release 2.5.2, documentation updated on 21st February, 2008.
SeeAbout this document... for information on suggesting changes.
[8]ページ先頭

©2009-2025 Movatter.jp