A UserException is-an XQueryException for errors raised via fn:error()
.
More...
#include <zorba/user_exception.h>
Public Types | |
typedef internal::diagnostic::location::column_type | column_type |
typedef internal::error_object_type | error_object_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... | |
error_object_type const & | error_object () const throw () |
Gets the error object associated with 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... | |
UserException & | operator= (UserException const &from) |
Assigns this UserException 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... | |
UserException (UserException const &from) | |
Copy-constructs a UserException. More... | |
char const * | what () const throw () |
~UserException () throw () | |
Destroys this UserException. 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 |
Static Protected Member Functions | |
static bool | print_uri (std::ostream &, char const *uri) |
Friends | |
UserException | internal::make_user_exception (char const *, line_type, char const *, char const *, char const *, char const *, internal::diagnostic::location const &, error_object_type *) |
UserException | internal::make_user_exception (char const *, line_type, Error const &, char const *, internal::diagnostic::location const &, error_object_type *) |
void | serialization::operator& (serialization::Archiver &, ZorbaException *&) |
A UserException is-an XQueryException for errors raised via fn:error()
.
Definition at line 96 of file user_exception.h.
Definition at line 39 of file xquery_exception.h.
Definition at line 98 of file user_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.
|
inherited |
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::UserException::UserException | ( | UserException const & | from | ) |
Copy-constructs a UserException.
from | The UserException to copy from. |
zorba::UserException::~UserException | ( | ) | throw () |
Destroys this UserException.
|
inlineinherited |
Gets the XQuery source-code "applied at" column number containing the error.
Definition at line 264 of file xquery_exception.h.
|
inlineinherited |
Gets the XQuery source-code "applied at" end column number containing the error.
Definition at line 284 of file xquery_exception.h.
|
inlineinherited |
Gets the XQuery source-code "applied at" line number containing the error.
Definition at line 254 of file xquery_exception.h.
|
inlineinherited |
Gets the XQuery source-code "applied at" end line number containing the error.
Definition at line 274 of file xquery_exception.h.
|
inlineinherited |
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.
|
inlineinherited |
Gets the data column number containing the error.
Definition at line 190 of file xquery_exception.h.
|
inlineinherited |
Gets the data end column number containing the error.
Definition at line 208 of file xquery_exception.h.
|
inlineinherited |
Gets the data line number containing the error.
Definition at line 181 of file xquery_exception.h.
|
inlineinherited |
Gets the data end line number containing the error.
Definition at line 199 of file xquery_exception.h.
|
inlineinherited |
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.
|
inline |
Gets the error object associated with this exception.
Definition at line 125 of file user_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.
|
inlinestaticinherited |
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.
|
inlineinherited |
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.
|
inlineinherited |
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.
|
inlineinherited |
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.
UserException& zorba::UserException::operator= | ( | UserException const & | from | ) |
Assigns this UserException from another.
from | The UserException 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<<().
|
protectedvirtualinherited |
Reimplemented from zorba::ZorbaException.
|
protectedinherited |
|
staticprotectedinherited |
|
inlineinherited |
Gets the XQuery stack trace, if any.
Definition at line 306 of file xquery_exception.h.
|
inlineinherited |
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.
|
inherited |
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. |
|
inherited |
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<<().
|
inlinestaticinherited |
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<<().
|
inherited |
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. |
|
inlineinherited |
Gets the XQuery source-code column number containing the error.
Definition at line 119 of file xquery_exception.h.
|
inlineinherited |
Gets the XQuery source-code end column number containing the error.
Definition at line 137 of file xquery_exception.h.
|
inlineinherited |
Gets the XQuery source-code line number containing the error.
Definition at line 110 of file xquery_exception.h.
|
inlineinherited |
Gets the XQuery source-code end line number containing the error.
Definition at line 128 of file xquery_exception.h.
|
inlineinherited |
Gets the XQuery source-code URI containing the error.
Definition at line 101 of file xquery_exception.h.
|
inherited |
|
friend |
|
friend |
|
friend |