共用方式為


IErrorHandler Interface

Definition

Basic interface for SAX error handlers.

[Android.Runtime.Register("org/xml/sax/ErrorHandler", "", "Org.Xml.Sax.IErrorHandlerInvoker")]
public interface IErrorHandler : Android.Runtime.IJavaObject, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("org/xml/sax/ErrorHandler", "", "Org.Xml.Sax.IErrorHandlerInvoker")>]
type IErrorHandler = interface
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Derived
Attributes
Implements

Remarks

Basic interface for SAX error handlers.

<blockquote> <em>This module, both source code and documentation, is in the Public Domain, and comes with <strong>NO WARRANTY</strong>.</em> See http://www.saxproject.org for further information. </blockquote>

If a SAX application needs to implement customized error handling, it must implement this interface and then register an instance with the XML reader using the org.xml.sax.XMLReader#setErrorHandler setErrorHandler method. The parser will then report all errors and warnings through this interface.

<strong>WARNING:</strong> If an application does <em>not</em> register an ErrorHandler, XML parsing errors will go unreported, except that <em>SAXParseException</em>s will be thrown for fatal errors. In order to detect validity errors, an ErrorHandler that does something with #error error() calls must be registered.

For XML processing errors, a SAX driver must use this interface in preference to throwing an exception: it is up to the application to decide whether to throw an exception for different types of errors and warnings. Note, however, that there is no requirement that the parser continue to report additional errors after a call to #fatalError fatalError. In other words, a SAX driver class may throw an exception after reporting any fatalError. Also parsers may throw appropriate exceptions for non-XML errors. For example, XMLReader#parse XMLReader.parse() would throw an IOException for errors accessing entities or the document.

Added in SAX 1.0.

Java documentation for org.xml.sax.ErrorHandler.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Properties

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)

Methods

Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Error(SAXParseException)

Receive notification of a recoverable error.

FatalError(SAXParseException)

Receive notification of a non-recoverable error.

Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)
Warning(SAXParseException)

Receive notification of a warning.

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to