Show / Hide Table of Contents

    Class SAXException

    Encapsulate a general SAX error or warning.

    Inheritance
    System.Object
    SAXException
    SAXNotRecognizedException
    SAXNotSupportedException
    SAXParseException
    Namespace: Sax
    Assembly: Lucene.Net.Benchmark.dll
    Syntax
    public class SAXException : Exception
    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 class can contain basic error or warning information from either the XML parser or the application: a parser writer or application writer can subclass it to provide additional functionality. SAX handlers may throw this exception or any exception subclassed from it.

    If the application needs to pass through other types of exceptions, it must wrap those exceptions in a SAXException or an exception derived from a SAXException.

    If the parser or application needs to include information about a specific location in an XML document, it should use the SAXParseException subclass.

    Constructors

    | Improve this Doc View Source

    SAXException()

    Create a new SAXException.

    Declaration
    public SAXException()
    | Improve this Doc View Source

    SAXException(Exception)

    Create a new SAXException wrapping an existing exception.

    Declaration
    public SAXException(Exception e)
    Parameters
    Type Name Description
    Exception e

    The exception to be wrapped in a SAXException.

    Remarks

    The existing exception will be embedded in the new one, and its message will become the default message for the SAXException.

    | Improve this Doc View Source

    SAXException(String)

    Create a new SAXException.

    Declaration
    public SAXException(string message)
    Parameters
    Type Name Description
    System.String message

    The error or warning message.

    | Improve this Doc View Source

    SAXException(String, Exception)

    Create a new SAXException from an existing exception.

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

    The detail message.

    Exception e

    The exception to be wrapped in a SAXException.

    Remarks

    The existing exception will be embedded in the new one, but the new exception will have its own message.

    Properties

    | Improve this Doc View Source

    Exception

    Gets the embedded exception, if any, or null if there is none.

    Declaration
    public virtual Exception Exception { get; }
    Property Value
    Type Description
    Exception
    | Improve this Doc View Source

    Message

    Return a detail message for this exception.

    Declaration
    public override string Message { get; }
    Property Value
    Type Description
    System.String
    Remarks

    If there is an embedded exception, and if the SAXException has no detail message of its own, this method will return the detail message from the embedded exception.

    Methods

    | Improve this Doc View Source

    ToString()

    Override ToString to pick up any embedded exception.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    A string representation of this exception.

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