Public Types | Public Member Functions | Protected Member Functions | Friends
zorba::ZorbaException Class Reference

A ZorbaException is the base class for all Zorba exceptions. More...

#include <zorba/zorba_exception.h>

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

List of all members.

Public Types

typedef
internal::diagnostic::location::line_type 
line_type

Public Member Functions

Diagnostic const & diagnostic () const throw ()
 Gets the diagnostic carried by this exception.
ZorbaExceptionoperator= (ZorbaException const &from)
 Assigns this ZorbaException from another.
virtual void polymorphic_throw () const
 Throws itself polymorphically; see http://www.parashift.com/c++-faq-lite/exceptions.html#faq-17.16.
char const * raise_file () const throw ()
 Gets the C++ source-code file name whence this exception was raised.
line_type raise_line () const throw ()
 Gets the C++ source-code line number whence this exception was raised.
void set_diagnostic (Diagnostic const &diagnostic) throw ()
 Sets the diagnostic.
char const * what () const throw ()
 ZorbaException (ZorbaException const &from)
 Copy-constructs a ZorbaException.
 ~ZorbaException () throw ()
 Destroys this ZorbaException.

Protected Member Functions

virtual std::unique_ptr
< ZorbaException
clone () const
 Clones this exception object.
virtual std::ostream & print (std::ostream &o) const
 Prints the exception to the given ostream.
 ZorbaException (Diagnostic const &diagnostic, char const *raise_file, line_type raise_line, char const *message)
 Constructs a ZorbaException.
 ZorbaException (serialization::Archiver &)

Friends

std::unique_ptr< ZorbaExceptionclone (ZorbaException const &)
ZorbaException make_zorba_exception (char const *, line_type, Diagnostic const &, internal::diagnostic::parameters const &)
ZorbaExceptionnew_zorba_exception (char const *, line_type, Diagnostic const &, internal::diagnostic::parameters const &)
std::ostream & operator<< (std::ostream &, ZorbaException const &)
 Emits the given ZorbaException to the given ostream.
void serialization::operator& (serialization::Archiver &, ZorbaException *&)

Detailed Description

A ZorbaException is the base class for all Zorba exceptions.

Examples:
context.cpp, datamanager.cpp, errors.cpp, external_functions.cpp, sax2.cpp, serialization.cpp, and simple.cpp.

Definition at line 42 of file zorba_exception.h.


Member Typedef Documentation

Definition at line 44 of file zorba_exception.h.


Constructor & Destructor Documentation

zorba::ZorbaException::ZorbaException ( ZorbaException const &  from)

Copy-constructs a ZorbaException.

Parameters:
fromThe ZorbaException to copy from.
zorba::ZorbaException::~ZorbaException ( ) throw ()

Destroys this ZorbaException.

zorba::ZorbaException::ZorbaException ( Diagnostic const &  diagnostic,
char const *  raise_file,
line_type  raise_line,
char const *  message 
)
protected

Constructs a ZorbaException.

Parameters:
diagnosticThe diagnostic.
raise_fileThe C++ source-code file name whence the exception was raised.
raise_lineThe C++ source-code line number whence the exception was raised.
messageThe diagnostic message.
zorba::ZorbaException::ZorbaException ( serialization::Archiver &  )
protected

Member Function Documentation

virtual std::unique_ptr<ZorbaException> zorba::ZorbaException::clone ( ) const
protectedvirtual

Clones this exception object.

Returns:
Returns a clone of this exception.

Reimplemented in zorba::XQueryException, and zorba::UserException.

Diagnostic const& zorba::ZorbaException::diagnostic ( ) const throw ()
inline

Gets the diagnostic carried by this exception.

Returns:
Returns said diagnostic.
Examples:
errors.cpp, external_functions.cpp, and simple.cpp.

Definition at line 71 of file zorba_exception.h.

ZorbaException& zorba::ZorbaException::operator= ( ZorbaException const &  from)

Assigns this ZorbaException from another.

Parameters:
fromThe ZorbaException to assign from.
Returns:
Returns *this.
virtual void zorba::ZorbaException::polymorphic_throw ( ) const
virtual
virtual std::ostream& zorba::ZorbaException::print ( std::ostream &  o) const
protectedvirtual

Prints the exception to the given ostream.

Parameters:
oThe ostream to print to.
Returns:
Returns o.

Reimplemented in zorba::XQueryException.

Referenced by zorba::operator<<().

char const* zorba::ZorbaException::raise_file ( ) const throw ()
inline

Gets the C++ source-code file name whence this exception was raised.

Returns:
Returns said file name.

Definition at line 95 of file zorba_exception.h.

line_type zorba::ZorbaException::raise_line ( ) const throw ()
inline

Gets the C++ source-code line number whence this exception was raised.

Returns:
Returns said line number.

Definition at line 104 of file zorba_exception.h.

void zorba::ZorbaException::set_diagnostic ( Diagnostic const &  diagnostic) throw ()
inline

Sets the diagnostic.

Parameters:
diagnosticThe diagnostic.

Definition at line 86 of file zorba_exception.h.

char const* zorba::ZorbaException::what ( ) const throw ()
Examples:
simple.cpp.

Friends And Related Function Documentation

std::unique_ptr<ZorbaException> clone ( ZorbaException const &  )
friend
ZorbaException make_zorba_exception ( char const *  ,
line_type  ,
Diagnostic const &  ,
internal::diagnostic::parameters const &   
)
friend
ZorbaException* new_zorba_exception ( char const *  ,
line_type  ,
Diagnostic const &  ,
internal::diagnostic::parameters const &   
)
friend
std::ostream& operator<< ( std::ostream &  o,
ZorbaException const &  e 
)
friend

Emits the given ZorbaException to the given ostream.

Parameters:
oThe ostream to emit to.
eThe ZorbaException to emit.
Returns:
Returns o.

Definition at line 174 of file zorba_exception.h.

void serialization::operator& ( serialization::Archiver &  ,
ZorbaException *&   
)
friend

The documentation for this class was generated from the following file:
blog comments powered by Disqus