Show / Hide Table of Contents

    Class SAXParseException

    Encapsulate an XML parse error or warning.

    Inheritance
    System.Object
    SAXException
    SAXParseException
    Inherited Members
    SAXException.Message
    SAXException.Exception
    SAXException.ToString()
    Namespace: Sax
    Assembly: Lucene.Net.Benchmark.dll
    Syntax
    public class SAXParseException : SAXException
    Remarks

    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. Seehttp://www.saxproject.org for further information.

    This exception may include information for locating the error in the original XML document, as if it came from a ILocator object. Note that although the application will receive a SAXParseException as the argument to the handlers in the IErrorHandler interface, the application is not actually required to throw the exception; instead, it can simply read the information in it and take a different action.

    Since this exception is a subclass of SAXException, it inherits the ability to wrap another exception.

    Constructors

    | Improve this Doc View Source

    SAXParseException(String, ILocator)

    Create a new SAXParseException from a message and a ILocator.

    Declaration
    public SAXParseException(string message, ILocator locator)
    Parameters
    Type Name Description
    System.String message

    The error or warning message.

    ILocator locator

    The locator object for the error or warning (may be null).

    Remarks

    This constructor is especially useful when an application is creating its own exception from within a IContentHandler callback.

    See Also
    ILocator
    | Improve this Doc View Source

    SAXParseException(String, ILocator, Exception)

    Wrap an existing exception in a SAXParseException.

    Declaration
    public SAXParseException(string message, ILocator locator, Exception e)
    Parameters
    Type Name Description
    System.String message

    The error or warning message, or null to use the message from the embedded exception.

    ILocator locator

    The locator object for the error or warning (may be null).

    Exception e

    Any exception.

    Remarks

    This constructor is especially useful when an application is creating its own exception from within a IContentHandler callback, and needs to wrap an existing exception that is not a subclass of SAXException.

    See Also
    ILocator
    | Improve this Doc View Source

    SAXParseException(String, String, String, Int32, Int32)

    Create a new SAXParseException.

    Declaration
    public SAXParseException(string message, string publicId, string systemId, int lineNumber, int columnNumber)
    Parameters
    Type Name Description
    System.String message

    The error or warning message.

    System.String publicId

    The public identifier of the entity that generated the error or warning.

    System.String systemId

    The system identifier of the entity that generated the error or warning.

    System.Int32 lineNumber

    The line number of the end of the text that caused the error or warning.

    System.Int32 columnNumber

    The column number of the end of the text that cause the error or warning.

    Remarks

    This constructor is most useful for parser writers.

    All parameters except the message are as if they were provided by a ILocator. For example, if the system identifier is a URL (including relative filename), the caller must resolve it fully before creating the exception.

    | Improve this Doc View Source

    SAXParseException(String, String, String, Int32, Int32, Exception)

    Create a new SAXParseException with an embedded exception.

    Declaration
    public SAXParseException(string message, string publicId, string systemId, int lineNumber, int columnNumber, Exception e)
    Parameters
    Type Name Description
    System.String message

    The error or warning message, or null to use the message from the embedded exception.

    System.String publicId

    The public identifier of the entity that generated the error or warning.

    System.String systemId

    The system identifier of the entity that generated the error or warning.

    System.Int32 lineNumber

    The line number of the end of the text that caused the error or warning.

    System.Int32 columnNumber

    The column number of the end of the text that cause the error or warning.

    Exception e

    Another exception to embed in this one.

    Remarks

    This constructor is most useful for parser writers who need to wrap an exception that is not a subclass of SAXException.

    All parameters except the message and exception are as if they were provided by a ILocator. For example, if the system identifier is a URL (including relative filename), the caller must resolve it fully before creating the exception.

    Properties

    | Improve this Doc View Source

    ColumnNumber

    The column number of the end of the text where the exception occurred.

    The first column in a line is position 1.

    An integer representing the column number, or -1 if none is available.

    Declaration
    public int ColumnNumber { get; }
    Property Value
    Type Description
    System.Int32
    See Also
    ColumnNumber
    | Improve this Doc View Source

    LineNumber

    The line number of the end of the text where the exception occurred.

    The first line is line 1.

    An integer representing the line number, or -1 if none is available.

    Declaration
    public int LineNumber { get; }
    Property Value
    Type Description
    System.Int32
    See Also
    LineNumber
    | Improve this Doc View Source

    PublicId

    Get the public identifier of the entity where the exception occurred. Returns a string containing the public identifier, or null if none is available.

    Declaration
    public string PublicId { get; }
    Property Value
    Type Description
    System.String
    See Also
    PublicId
    | Improve this Doc View Source

    SystemId

    Get the system identifier of the entity where the exception occurred.

    If the system identifier is a URL, it will have been resolved fully.

    A string containing the system identifier, or null if none is available.

    Declaration
    public string SystemId { get; }
    Property Value
    Type Description
    System.String
    See Also
    SystemId

    See Also

    SAXException
    ILocator
    IErrorHandler
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)