Unicorn XML Toolkit
Version 1.50.00

Namespace Sax
Class CSaxException

class CSaxException: public IException {
public:
    CSaxException(const WCHAR *pszMessage);
    CSaxException(IException *pException);
    CSaxException(
        const WCHAR *pszMessage,
        IException *pException);
    ~CSaxException();
public:
    CString GetMessage();
    IException *GetException();
public:
    CString ToString();
    };

The general SAX error or warning.

This class can contain basic error or warning information from either the XML reader or the application: a reader developer or application developer 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 CSaxException or an exception derived from a CSaxException .

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

Since:
1.00.00
Version:
1.50.00
Author:
C++ interfaces by Alexey Gokhberg; based on the original SAX2 specification by David Megginson
Constructor/Destructor Summary
CSaxException (const WCHAR *pszMessage);
����������Constructs the SAX exception.
CSaxException (IException *pException);
����������Constructs the SAX exception wrapping an existing exception.
CSaxException (const WCHAR *pszMessage, IException *pException);
����������Constructs the SAX exception from an existing exception.
~CSaxException ();
����������Destroys the SAX exception.

Function Summary
CString GetMessage ();
����������Gets a detail message for this exception.
IException�* GetException ();
����������Gets the embedded exception, if any.
CString ToString ();
����������Gets the string representation of this exception.

Constructor/Destructor Detail

CSaxException

CSaxException(const WCHAR *pszMessage);

Constructs the SAX exception.

Parameters:
pszMessage - the error or warning message

CSaxException

CSaxException(IException *pException);

Constructs the SAX exception wrapping an existing exception.

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

Parameters:
pException - the exception to be wrapped in this SAX exception

CSaxException

CSaxException(
    const WCHAR *pszMessage,
    IException *pException);

Constructs the SAX exception from an existing exception.

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

Parameters:
pszMessage - the detail message
pException - the exception to be wrapped in this SAX exception

~CSaxException

~CSaxException();

Destroys the SAX exception.

Function Detail

GetMessage

CString GetMessage();

Gets a detail message for this exception.

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

Returns:
the error or warning message

GetException

IException *GetException();

Gets the embedded exception, if any.

Returns:
the embedded exception, or NULL if there is none

ToString

CString ToString();

Gets the string representation of this exception.

Returns:
the string representation of this exception

Unicorn XML Toolkit
Version 1.50.00


This document was created using Unicorn DOC++.

Copyright 1999-2001 Unicorn Enterprises SA.
All Rights Reserved.