zorba::ZorbaException Class Reference

Base class of all exceptions thrown by Zorba. More...

#include <zorba/exception.h>

Inheritance diagram for zorba::ZorbaException:

Inheritance graph
[legend]
Collaboration diagram for zorba::ZorbaException:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual String getDescription () const
 Get the description of the error that is reported by this exception.
virtual XQUERY_ERROR getErrorCode () const
 Get the ErrorCode of the error that is reported by this exception.
virtual unsigned int getFileLineNumber () const
 Get the line number in the source file in which the error occured.
virtual String getFileName () const
 Get the name of the source file in which the error occured.
virtual ~ZorbaException () throw ()
 Destructor.

Static Public Member Functions

static std::string getErrorCodeAsString (const XQUERY_ERROR &aErrorCode)
 Static function to convert an XQUERY_ERROR to a String.

Protected Member Functions

 ZorbaException (const XQUERY_ERROR &, const String &aDescription, const String &aFileName, unsigned int aFileLineNumber)
 Proctected constructor - only the Zorba engine and external functions can construct and throw exceptions.

Protected Attributes

String theDescription
XQUERY_ERROR theErrorCode
unsigned int theFileLineNumber
String theFileName

Friends

class ExternalFunctionData
class ZorbaImpl


Detailed Description

Base class of all exceptions thrown by Zorba.
Examples:

context.cpp, datamanager.cpp, errors.cpp, external_functions.cpp, sax2.cpp, and serialization.cpp.

Definition at line 27 of file exception.h.


Constructor & Destructor Documentation

virtual zorba::ZorbaException::~ZorbaException (  )  throw () [virtual]

Destructor.

zorba::ZorbaException::ZorbaException ( const XQUERY_ERROR ,
const String aDescription,
const String aFileName,
unsigned int  aFileLineNumber 
) [protected]

Proctected constructor - only the Zorba engine and external functions can construct and throw exceptions.


Member Function Documentation

virtual String zorba::ZorbaException::getDescription (  )  const [virtual]

Get the description of the error that is reported by this exception.

virtual XQUERY_ERROR zorba::ZorbaException::getErrorCode (  )  const [virtual]

Get the ErrorCode of the error that is reported by this exception.

static std::string zorba::ZorbaException::getErrorCodeAsString ( const XQUERY_ERROR aErrorCode  )  [static]

Static function to convert an XQUERY_ERROR to a String.

Parameters:
aErrorCode the XQUERY_ERROR to convert to a String.
Returns:
String the String representation of the XQUERY_ERROR.

virtual unsigned int zorba::ZorbaException::getFileLineNumber (  )  const [virtual]

Get the line number in the source file in which the error occured.

Note that this information is mainly for debugging purposes.

Returns:
unsigned int the line number in the source file.

virtual String zorba::ZorbaException::getFileName (  )  const [virtual]

Get the name of the source file in which the error occured.

Note that this information is mainly for debugging purposes.

Returns:
String the name of the file where the error occured.


Friends And Related Function Documentation

friend class ExternalFunctionData [friend]

Definition at line 74 of file exception.h.

friend class ZorbaImpl [friend]


Member Data Documentation

Definition at line 83 of file exception.h.

Definition at line 82 of file exception.h.

unsigned int zorba::ZorbaException::theFileLineNumber [protected]

Definition at line 85 of file exception.h.

Definition at line 84 of file exception.h.


The documentation for this class was generated from the following file: