An XQueryException is-a ZorbaException for errors with the user's XQuery. More...
#include <zorba/xquery_exception.h>


Public Types | |
| typedef internal::diagnostic::location::column_type | column_type |
| typedef internal::diagnostic::location::line_type | line_type |
| enum | print_format { format_text = 0, format_xml = 1, format_xml_indented = 3 } |
| The format to print exceptions as to an ostream. More... | |
| enum | print_trace { trace, no_trace } |
| Whether to include the XQuery stack trace for the XQueryException that's printed to an ostream. More... | |
Public Member Functions | |
| column_type | applied_column () const throw () |
| Gets the XQuery source-code "applied at" column number containing the error. More... | |
| column_type | applied_column_end () const throw () |
| Gets the XQuery source-code "applied at" end column number containing the error. More... | |
| line_type | applied_line () const throw () |
| Gets the XQuery source-code "applied at" line number containing the error. More... | |
| line_type | applied_line_end () const throw () |
| Gets the XQuery source-code "applied at" end line number containing the error. More... | |
| char const * | applied_uri () const throw () |
| Gets the XQuery source-code "applied at" URI containing the error. More... | |
| column_type | data_column () const throw () |
| Gets the data column number containing the error. More... | |
| column_type | data_column_end () const throw () |
| Gets the data end column number containing the error. More... | |
| line_type | data_line () const throw () |
| Gets the data line number containing the error. More... | |
| line_type | data_line_end () const throw () |
| Gets the data end line number containing the error. More... | |
| char const * | data_uri () const throw () |
| Gets the data URI containing the error. More... | |
| Diagnostic const & | diagnostic () const throw () |
| Gets the diagnostic carried by this exception. More... | |
| bool | has_applied () const throw () |
| Checks whether the XQuery "applied at" location has been set. More... | |
| bool | has_data () const throw () |
| Checks whether the XQuery data location has been set. More... | |
| bool | has_source () const throw () |
| Checks whether the XQuery source-code location has been set. More... | |
| XQueryException & | operator= (XQueryException const &from) |
| Assigns this XQueryException from another. More... | |
| void | polymorphic_throw () const |
| Throws itself polymorphically; see http://www.parashift.com/c++-faq-lite/exceptions.html#faq-17.16. More... | |
| XQueryStackTrace & | query_trace () throw () |
| Gets the XQuery stack trace, if any. More... | |
| XQueryStackTrace const & | query_trace () const throw () |
| Gets the XQuery stack trace, if any. More... | |
| char const * | raise_file () const throw () |
| Gets the C++ source-code file name whence this exception was raised. More... | |
| line_type | raise_line () const throw () |
| Gets the C++ source-code line number whence this exception was raised. More... | |
| void | set_applied (char const *uri, line_type line, column_type column=0, line_type line_end=0, column_type column_end=0) |
| Sets the XQuery source-code "applied at" URI name, line, and column numbers. More... | |
| void | set_data (char const *uri, line_type line, column_type column=0, line_type line_end=0, column_type column_end=0) |
| Sets the XQuery source-code data URI name, line, and column numbers. More... | |
| void | set_diagnostic (Diagnostic const &diagnostic) throw () |
| Sets the diagnostic. More... | |
| void | set_source (char const *uri, line_type line, column_type column=0, line_type line_end=0, column_type column_end=0) |
| Sets the XQuery source-code URI name, line, and column numbers. More... | |
| column_type | source_column () const throw () |
| Gets the XQuery source-code column number containing the error. More... | |
| column_type | source_column_end () const throw () |
| Gets the XQuery source-code end column number containing the error. More... | |
| line_type | source_line () const throw () |
| Gets the XQuery source-code line number containing the error. More... | |
| line_type | source_line_end () const throw () |
| Gets the XQuery source-code end line number containing the error. More... | |
| char const * | source_uri () const throw () |
| Gets the XQuery source-code URI containing the error. More... | |
| char const * | what () const throw () |
| XQueryException (XQueryException const &from) | |
| Copy-constructs an XQueryException. More... | |
| ~XQueryException () throw () | |
| Destroys this XQueryException. More... | |
Static Public Member Functions | |
| static print_format | get_print_format (std::ostream &o) |
| Gets the current print_format associated with the given ostream. More... | |
| static bool | get_print_trace (std::ostream &o) |
| Gets whether XQuery stack traces will be included when XQueryExceptions are printed to the given ostream. More... | |
| static void | set_print_format (std::ostream &o, print_format f) |
| Sets the print_format of the given ostream. More... | |
| static void | set_print_trace (std::ostream &o, bool print) |
| Sets whether XQuery stack traces will be included when XQueryExceptions are printed to the given ostream. More... | |
Protected Member Functions | |
| std::unique_ptr< ZorbaException > | clone () const |
| Clones this exception object. More... | |
| std::ostream & | print (std::ostream &) const |
| Prints the exception to the given ostream. More... | |
| std::ostream & | print_impl (std::ostream &) const |
| std::ostream & | print_stack_trace (std::ostream &) const |
| XQueryException (serialization::Archiver &ar) | |
Static Protected Member Functions | |
| static bool | print_uri (std::ostream &, char const *uri) |
Friends | |
| XQueryException | make_xquery_exception (char const *, ZorbaException::line_type, Diagnostic const &, parameters const &, location const &) |
| XQueryException * | new_xquery_exception (char const *, ZorbaException::line_type, Diagnostic const &, parameters const &, location const &) |
| void | serialization::operator& (serialization::Archiver &, ZorbaException *&) |
| void | set_applied (ZorbaException &, char const *, line_type, column_type, line_type, column_type, bool) |
| void | set_data (ZorbaException &, char const *, line_type, column_type, line_type, column_type, bool) |
| void | set_source (ZorbaException &, char const *, line_type, column_type, line_type, column_type, bool) |
| class | UserException |
An XQueryException is-a ZorbaException for errors with the user's XQuery.
An XQueryException therefore also contains the XQuery source URI, line, and column numbers.
Definition at line 37 of file xquery_exception.h.
Definition at line 39 of file xquery_exception.h.
|
inherited |
Definition at line 44 of file zorba_exception.h.
|
inherited |
The format to print exceptions as to an ostream.
| Enumerator | |
|---|---|
| format_text |
plain text |
| format_xml |
XML without unnecessary whitespace. |
| format_xml_indented |
XML with newlines and indentation. |
Definition at line 49 of file zorba_exception.h.
Whether to include the XQuery stack trace for the XQueryException that's printed to an ostream.
| Enumerator | |
|---|---|
| trace | |
| no_trace | |
Definition at line 45 of file xquery_exception.h.
| zorba::XQueryException::XQueryException | ( | XQueryException const & | from | ) |
Copy-constructs an XQueryException.
| from | The XQueryException to copy from. |
| zorba::XQueryException::~XQueryException | ( | ) | ||
| throw | ( | |||
| ) | ||||
Destroys this XQueryException.
|
protected |
|
inline | |||||||||||||
Gets the XQuery source-code "applied at" column number containing the error.
Definition at line 264 of file xquery_exception.h.
|
inline | |||||||||||||
Gets the XQuery source-code "applied at" end column number containing the error.
Definition at line 284 of file xquery_exception.h.
|
inline | |||||||||||||
Gets the XQuery source-code "applied at" line number containing the error.
Definition at line 254 of file xquery_exception.h.
|
inline | |||||||||||||
Gets the XQuery source-code "applied at" end line number containing the error.
Definition at line 274 of file xquery_exception.h.
|
inline | |||||||||||||
Gets the XQuery source-code "applied at" URI containing the error.
Definition at line 245 of file xquery_exception.h.
|
protectedvirtual |
Clones this exception object.
Reimplemented from zorba::ZorbaException.
|
inline | |||||||||||||
Gets the data column number containing the error.
Definition at line 190 of file xquery_exception.h.
|
inline | |||||||||||||
Gets the data end column number containing the error.
Definition at line 208 of file xquery_exception.h.
|
inline | |||||||||||||
Gets the data line number containing the error.
Definition at line 181 of file xquery_exception.h.
|
inline | |||||||||||||
Gets the data end line number containing the error.
Definition at line 199 of file xquery_exception.h.
|
inline | |||||||||||||
Gets the data URI containing the error.
Definition at line 172 of file xquery_exception.h.
|
inlineinherited | |||||||||||||
Gets the diagnostic carried by this exception.
Definition at line 80 of file zorba_exception.h.
|
inlinestaticinherited |
Gets the current print_format associated with the given ostream.
| o | The ostream to get the print_format of. |
Definition at line 90 of file zorba_exception.h.
|
inlinestatic |
Gets whether XQuery stack traces will be included when XQueryExceptions are printed to the given ostream.
| o | The ostream. |
Definition at line 297 of file xquery_exception.h.
|
inline | |||||||||||||
Checks whether the XQuery "applied at" location has been set.
true only if the "applied at" location has been set. Definition at line 219 of file xquery_exception.h.
|
inline | |||||||||||||
Checks whether the XQuery data location has been set.
true only if the data location has been set. Definition at line 148 of file xquery_exception.h.
|
inline | |||||||||||||
Checks whether the XQuery source-code location has been set.
true only if said has been set. Definition at line 77 of file xquery_exception.h.
| XQueryException& zorba::XQueryException::operator= | ( | XQueryException const & | from | ) |
Assigns this XQueryException from another.
| from | The XQueryException to assign from. |
*this.
|
virtual |
Throws itself polymorphically; see http://www.parashift.com/c++-faq-lite/exceptions.html#faq-17.16.
Reimplemented from zorba::ZorbaException.
|
protectedinherited |
Prints the exception to the given ostream.
| o | The ostream to print to. |
Referenced by zorba::operator<<().
|
protectedvirtual |
Reimplemented from zorba::ZorbaException.
|
protected |
|
staticprotected |
|
inline | |||||||||||||
Gets the XQuery stack trace, if any.
Definition at line 306 of file xquery_exception.h.
|
inline | |||||||||||||
Gets the XQuery stack trace, if any.
Definition at line 315 of file xquery_exception.h.
|
inlineinherited | |||||||||||||
Gets the C++ source-code file name whence this exception was raised.
Definition at line 114 of file zorba_exception.h.
|
inlineinherited | |||||||||||||
Gets the C++ source-code line number whence this exception was raised.
Definition at line 123 of file zorba_exception.h.
| void zorba::XQueryException::set_applied | ( | char const * | uri, |
| line_type | line, | ||
| column_type | column = 0, |
||
| line_type | line_end = 0, |
||
| column_type | column_end = 0 |
||
| ) |
Sets the XQuery source-code "applied at" URI name, line, and column numbers.
| uri | The source-code "applied at" URI name. If either the null pointer or the empty string, source_uri() is used. |
| line | The source-code "applied at" URI line number. |
| column | The source-code "applied at" URI column number. |
| line_end | The source-code "applied at" URI end line number. |
| column_end | The source-code "applied at" URI end column number. |
| void zorba::XQueryException::set_data | ( | char const * | uri, |
| line_type | line, | ||
| column_type | column = 0, |
||
| line_type | line_end = 0, |
||
| column_type | column_end = 0 |
||
| ) |
Sets the XQuery source-code data URI name, line, and column numbers.
| uri | The source-code data URI name. Must not be null. |
| line | The source-code data URI line number. |
| column | The source-code data URI column number. |
| line_end | The source-code data URI end line number. |
| column_end | The source-code data URI end column number. |
|
inlineinherited | ||||||||||||||
Sets the diagnostic.
| diagnostic | The diagnostic. |
Definition at line 105 of file zorba_exception.h.
|
inlinestaticinherited |
Sets the print_format of the given ostream.
| o | The ostream to set the print_format of. |
| f | The print_format value. |
Definition at line 133 of file zorba_exception.h.
Referenced by zorba::operator<<().
|
inlinestatic |
Sets whether XQuery stack traces will be included when XQueryExceptions are printed to the given ostream.
| o | The ostream to affect. |
| If true, stack traces will be included. |
Definition at line 326 of file xquery_exception.h.
Referenced by zorba::operator<<().
| void zorba::XQueryException::set_source | ( | char const * | uri, |
| line_type | line, | ||
| column_type | column = 0, |
||
| line_type | line_end = 0, |
||
| column_type | column_end = 0 |
||
| ) |
Sets the XQuery source-code URI name, line, and column numbers.
| uri | The source-code URI name. |
| line | The source-code URI line number. |
| column | The source-code URI column number. |
| line_end | The source-code URI end line number. |
| column_end | The source-code URI end column number. |
|
inline | |||||||||||||
Gets the XQuery source-code column number containing the error.
Definition at line 119 of file xquery_exception.h.
|
inline | |||||||||||||
Gets the XQuery source-code end column number containing the error.
Definition at line 137 of file xquery_exception.h.
|
inline | |||||||||||||
Gets the XQuery source-code line number containing the error.
Definition at line 110 of file xquery_exception.h.
|
inline | |||||||||||||
Gets the XQuery source-code end line number containing the error.
Definition at line 128 of file xquery_exception.h.
|
inline | |||||||||||||
Gets the XQuery source-code URI containing the error.
Definition at line 101 of file xquery_exception.h.
|
inherited | |||||||||||||
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Definition at line 386 of file xquery_exception.h.