zorba::UserException#include <zorba/user_exception.h> Inherited from: zorba::XQueryException A UserException is-an XQueryException for errors raised via fn:error().Public Types
Private AttributesPublic Functions
Protected Functions
Private Functions
Friend Classes
Public Static Functions
Protected Static Functions
Public Typesprint_format print_format The format to print exceptions as to an ostream.
print_trace print_trace Whether to include the XQuery stack trace for the XQueryException that's printed to an ostream.
Private AttributesPublic Functionsapplied_columncolumn_type applied_column() const Gets the XQuery source-code "applied at" column number containing the error.
ReturnsReturns said column number or 0 if unset.applied_column_endcolumn_type applied_column_end() const Gets the XQuery source-code "applied at" end column number containing the error.
ReturnsReturns said column number or 0 if unset.applied_lineline_type applied_line() const Gets the XQuery source-code "applied at" line number containing the error.
ReturnsReturns said line number or 0 if unset.applied_line_endline_type applied_line_end() const Gets the XQuery source-code "applied at" end line number containing the error.
ReturnsReturns said line number or 0 if unset.applied_urichar const * applied_uri() const Gets the XQuery source-code "applied at" URI containing the error.
ReturnsReturns said URI or the empty string if unset.data_columncolumn_type data_column() const Gets the data column number containing the error.
ReturnsReturns said column number or 0 if unset.data_column_endcolumn_type data_column_end() const Gets the data end column number containing the error.
ReturnsReturns said column number or 0 if unset.data_lineline_type data_line() const Gets the data line number containing the error.
ReturnsReturns said line number or 0 if unset.data_line_endline_type data_line_end() const Gets the data end line number containing the error.
ReturnsReturns said line number or 0 if unset.data_urichar const * data_uri() const Gets the data URI containing the error.
ReturnsReturns said URI or the empty string if unset.diagnosticDiagnostic const & diagnostic() const Gets the diagnostic carried by this exception.
ReturnsReturns said diagnostic.error_objecterror_object_type const & error_object() const Gets the error object associated with this exception.
ReturnsReturns said error object.has_appliedbool has_applied() const Checks whether the XQuery "applied at" location has been set.
ReturnsReturns true only if the "applied at" location has been set.has_databool has_data() const Checks whether the XQuery data location has been set.
ReturnsReturns true only if the data location has been set.has_sourcebool has_source() const Checks whether the XQuery source-code location has been set.
ReturnsReturns true only if said has been set.operator=UserException & operator=(UserException const &from) Assigns this UserException from another.
Parameters
ReturnsReturns *this.polymorphic_throwvoid polymorphic_throw() const Throws itself polymorphically; see http://www.parashift.com/c++-faq-lite/exceptions.html#faq-17.16.
query_traceXQueryStackTrace & query_trace() query_traceXQueryStackTrace const & query_trace() const raise_filechar const * raise_file() const Gets the C++ source-code file name whence this exception was raised.
ReturnsReturns said file name.raise_lineline_type raise_line() const Gets the C++ source-code line number whence this exception was raised.
ReturnsReturns said line number.set_appliedvoid 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.
Parameters
set_datavoid 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.
Parameters
set_diagnosticvoid set_diagnostic(Diagnostic const &diagnostic) Sets the diagnostic.
Parameters
set_sourcevoid 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.
Parameters
source_columncolumn_type source_column() const Gets the XQuery source-code column number containing the error.
ReturnsReturns said column number or 0 if unset.source_column_endcolumn_type source_column_end() const Gets the XQuery source-code end column number containing the error.
ReturnsReturns said column number or 0 if unset.source_lineline_type source_line() const Gets the XQuery source-code line number containing the error.
ReturnsReturns said line number or 0 if unset.source_line_endline_type source_line_end() const Gets the XQuery source-code end line number containing the error.
ReturnsReturns said line number or 0 if unset.source_urichar const * source_uri() const Gets the XQuery source-code URI containing the error.
ReturnsReturns said URI or the empty string if unset.UserException UserException(UserException const &from) Copy-constructs a UserException.
Parameters
whatchar const * what() const
~UserException ~UserException() Destroys this UserException.
Protected FunctionscloneClones this exception object.
ReturnsReturns a clone of this exception.std::ostream & print(std::ostream &) const Prints the exception to the given ostream.
Parameters
ReturnsReturns o.print_implstd::ostream & print_impl(std::ostream &) const
print_stack_tracestd::ostream & print_stack_trace(std::ostream &) const
Private FunctionsUserException UserException(char const *ns, char const *prefix, char const *localname, char const *raise_file, line_type raise_line, char const *description, error_object_type *error_object) Constructs a UserException.
Parameters
UserException UserException(Error const &error, char const *raise_file, line_type raise_line, char const *description, error_object_type *error_object) Constructs a UserException.
Parameters
UserException UserException(serialization::Archiver &)
Friend Classesinternal::make_user_exceptionfriend UserException internal::make_user_exception(char const *, line_type, char const *, char const *, char const *, char const *, internal::diagnostic::location const &, error_object_type *)
internal::make_user_exceptionfriend UserException internal::make_user_exception(char const *, line_type, Error const &, char const *, internal::diagnostic::location const &, error_object_type *)
serialization::operator&friend void serialization::operator&(serialization::Archiver &, ZorbaException *&)
Public Static Functionsget_print_formatprint_format get_print_format(std::ostream &o) Gets the current print_format associated with the given ostream.
Parameters
ReturnsReturns said print_format.get_print_tracebool get_print_trace(std::ostream &o) Gets whether XQuery stack traces will be included when XQueryExceptions are printed to the given ostream.
Parameters
ReturnsReturns true only if stack traces will be included.set_print_formatvoid set_print_format(std::ostream &o, print_format f) Sets the print_format of the given ostream.
Parameters
set_print_tracevoid set_print_trace(std::ostream &o, bool print) Sets whether XQuery stack traces will be included when XQueryExceptions are printed to the given ostream.
Parameters
Protected Static Functionsprint_uribool print_uri(std::ostream &, char const *uri)
|