A ZorbaException is the base class for all Zorba exceptions. More...
#include <zorba/zorba_exception.h>
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. | |
ZorbaException & | operator= (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< ZorbaException > | clone (ZorbaException const &) |
ZorbaException | make_zorba_exception (char const *, line_type, Diagnostic const &, internal::diagnostic::parameters const &) |
ZorbaException * | new_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 *&) |
A ZorbaException is the base class for all Zorba exceptions.
Definition at line 42 of file zorba_exception.h.
Definition at line 44 of file zorba_exception.h.
zorba::ZorbaException::ZorbaException | ( | ZorbaException const & | from | ) |
Copy-constructs a ZorbaException.
from | The 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.
diagnostic | The diagnostic. |
raise_file | The C++ source-code file name whence the exception was raised. |
raise_line | The C++ source-code line number whence the exception was raised. |
message | The diagnostic message. |
zorba::ZorbaException::ZorbaException | ( | serialization::Archiver & | ) | [protected] |
virtual std::unique_ptr<ZorbaException> zorba::ZorbaException::clone | ( | ) | const [protected, virtual] |
Clones this exception object.
Reimplemented in zorba::XQueryException, and zorba::UserException.
Diagnostic const& zorba::ZorbaException::diagnostic | ( | ) | const throw () [inline] |
Gets the diagnostic carried by this exception.
Definition at line 71 of file zorba_exception.h.
ZorbaException& zorba::ZorbaException::operator= | ( | ZorbaException const & | from | ) |
Assigns this ZorbaException from another.
from | The ZorbaException to assign from. |
*this
. virtual void zorba::ZorbaException::polymorphic_throw | ( | ) | const [virtual] |
Throws itself polymorphically; see http://www.parashift.com/c++-faq-lite/exceptions.html#faq-17.16.
Reimplemented in zorba::XQueryException, and zorba::UserException.
virtual std::ostream& zorba::ZorbaException::print | ( | std::ostream & | o | ) | const [protected, virtual] |
Prints the exception to the given ostream.
o | The ostream to print to. |
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.
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.
Definition at line 104 of file zorba_exception.h.
void zorba::ZorbaException::set_diagnostic | ( | Diagnostic const & | diagnostic | ) | throw () [inline] |
Sets the diagnostic.
diagnostic | The diagnostic. |
Definition at line 86 of file zorba_exception.h.
char const* zorba::ZorbaException::what | ( | ) | const throw () |
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.
o | The ostream to emit to. |
e | The ZorbaException to emit. |
Definition at line 174 of file zorba_exception.h.
void serialization::operator& | ( | serialization::Archiver & | , |
ZorbaException *& | |||
) | [friend] |
Reimplemented in zorba::XQueryException, and zorba::UserException.