Unicorn XML Toolkit
Version 1.00.00

Namespace Sxp
Class CParseException

class CParseException: public IException {
public:
    CParseException(
        const CString &strMessage, 
        const XLocator &pLocator,
        IException *e=NULL);
    CParseException(
        const CString &strMessage,
        const CString &strPublicId,
        const CString &strSystemId,
        int nLineNumber,
        int nColumnNumber,
        IException *e=NULL);
public:
    CString ToString();
public:
    CString GetMessage() const;
    IException *GetException() const;
    CString GetPublicId() const;
    CString GetSystemId() const;
    int GetLineNumber() const;
    int GetColumnNumber() const;
    };

The exception representing an SXP parse error or warning.

This exception includes information for locating the error in the original XML document. Note that although the application will receive the CParseException 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:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
See Also:
ILocator
Constructor/Destructor Summary
CParseException (const CString &strMessage, const XLocator &pLocator, IException *e=NULL);
����������Constructs the parse exception from a message and a locator.
CParseException (const CString &strMessage, const CString &strPublicId, const CString &strSystemId, int nLineNumber, int nColumnNumber, IException *e=NULL);
����������Constructs the parse exception.

Function Summary
CString ToString ();
����������Gets the string representation of this exception.
CString GetMessage ();
����������Gets the error or warning message associated with this exception.
IException�* GetException ();
����������Gets the exception wrapped by this parse exception.
CString GetPublicId ();
����������Gets the public identifier of the entity where this exception occured.
CString GetSystemId ();
����������Gets the system identifier of the entity where this exception occured.
int GetLineNumber ();
����������Gets the line number of the end of the text where this exception occured.
int GetColumnNumber ();
����������Gets the column number of the end of the text where this exception occured.

Constructor/Destructor Detail

CParseException

CParseException(
    const CString &strMessage, 
    const XLocator &pLocator,
    IException *e=NULL);

Constructs the parse exception from a message and a locator.

Parameters:
strMessage - the error or warning message, or the empty string to use the message from the embedded exception
pLocator - the locator object for the error or warning, or NULL if none is supplied
e - any exception to be wrapped in this parse exception, or NULL if none is supplied

CParseException

CParseException(
    const CString &strMessage,
    const CString &strPublicId,
    const CString &strSystemId,
    int nLineNumber,
    int nColumnNumber,
    IException *e=NULL);

Constructs the parse exception.

Parameters:
strMessage - the error or warning message, or NULL to use the message from the embedded exception
strPublicId - the public identifier of the entity that generated the error or warning
strSystemId - the system identifier of the entity that generated the error or warning
nLineNumber - the line number of the end of the text that caused the error or warning
nColumnNumber - the column number of the end of the text that caused the error or warning
e - any exception to be wrapped in this parse exception, or NULL if none is supplied
Function Detail

ToString

CString ToString();

Gets the string representation of this exception.

Returns:
the string representation of this exception

GetMessage

CString GetMessage();

Gets the error or warning message associated with this exception.

Returns:
the error or warning message associated with this exception

GetException

IException *GetException();

Gets the exception wrapped by this parse exception.

Returns:
the exception wrapped by this parse exception, or NULL if none is available

GetPublicId

CString GetPublicId();

Gets the public identifier of the entity where this exception occured.

Returns:
a string containing the public identifier, or the empty string if none is available

GetSystemId

CString GetSystemId();

Gets the system identifier of the entity where this exception occured.

Returns:
a string containing the system identifier, or the empty string if none is available

GetLineNumber

int GetLineNumber();

Gets the line number of the end of the text where this exception occured.

Returns:
an integer representing the line number, or -1 if none is available

GetColumnNumber

int GetColumnNumber();

Gets the column number of the end of the text where this exception occured.

The first column in a line is position 1.

Returns:
an integer representing the column number, or -1 if none is available

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

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