zorba::TypeException Class Reference

TypeException represents a type error as defined in the XQuery 1.0 Specification (see http://www.w3.org/TR/xquery/#id-kinds-of-errors). More...

#include <zorba/exception.h>

Inheritance diagram for zorba::TypeException:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual unsigned int getColumnBegin () const
 Get the column number in the query where the error occured.
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 unsigned int getLineBegin () const
 Get the line number in the query where the error occured.
virtual String getQueryURI () const
 Get the uri of the query where the error occured.
virtual ~TypeException () 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

 TypeException (const XQUERY_ERROR &, const String &, const String &afilename, unsigned int afilelinenumber, const String &queryuri, unsigned int linebegin, unsigned int columnbegin)
 Proctected constructor - only the Zorba engine can construct and throw exceptions.

Protected Attributes

unsigned int theColumnBegin
String theDescription
XQUERY_ERROR theErrorCode
unsigned int theFileLineNumber
String theFileName
unsigned int theLineBegin
String theQueryURI

Friends

class ExternalFunctionData
ZORBA_DLL_PUBLIC std::ostream & operator<< (std::ostream &, const QueryException &)
 Print information about the exception to the given output stream.
ZORBA_DLL_PUBLIC std::ostream & operator<< (std::ostream &, const TypeException &)
 Print information about the exception to the given output stream.
class ZorbaImpl


Detailed Description

TypeException represents a type error as defined in the XQuery 1.0 Specification (see http://www.w3.org/TR/xquery/#id-kinds-of-errors).
Examples:

external_functions.cpp.

Definition at line 203 of file exception.h.


Constructor & Destructor Documentation

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

Destructor.

zorba::TypeException::TypeException ( const XQUERY_ERROR ,
const String ,
const String afilename,
unsigned int  afilelinenumber,
const String queryuri,
unsigned int  linebegin,
unsigned int  columnbegin 
) [protected]

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


Member Function Documentation

virtual unsigned int zorba::QueryException::getColumnBegin (  )  const [virtual, inherited]

Get the column number in the query where the error occured.

Returns:
unsigned int the column number in the query.

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

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

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

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

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

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, inherited]

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, inherited]

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.

virtual unsigned int zorba::QueryException::getLineBegin (  )  const [virtual, inherited]

Get the line number in the query where the error occured.

Returns:
unsigned int the line number in the query.

virtual String zorba::QueryException::getQueryURI (  )  const [virtual, inherited]

Get the uri of the query where the error occured.

Returns:
String the uri of the query


Friends And Related Function Documentation

friend class ExternalFunctionData [friend, inherited]

Definition at line 74 of file exception.h.

ZORBA_DLL_PUBLIC std::ostream& operator<< ( std::ostream &  ,
const QueryException  
) [friend, inherited]

Print information about the exception to the given output stream.

ZORBA_DLL_PUBLIC std::ostream& operator<< ( std::ostream &  ,
const TypeException  
) [friend]

Print information about the exception to the given output stream.

friend class ZorbaImpl [friend]

Reimplemented from zorba::QueryException.

Definition at line 206 of file exception.h.


Member Data Documentation

unsigned int zorba::QueryException::theColumnBegin [protected, inherited]

Definition at line 139 of file exception.h.

Definition at line 83 of file exception.h.

Definition at line 82 of file exception.h.

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

Definition at line 85 of file exception.h.

Definition at line 84 of file exception.h.

unsigned int zorba::QueryException::theLineBegin [protected, inherited]

Definition at line 138 of file exception.h.

Definition at line 140 of file exception.h.


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