zorba::XQueryException#include <zorba/xquery_exception.h> Inherited from: zorba::ZorbaException 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.Public Types
Private AttributesFriend Classes
Public Functions
Public Static Functions
Protected Functions
Protected Static Functions
Private Functions
Private 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 TypesPrivate AttributesFriend Classesmake_xquery_exceptionfriend XQueryException make_xquery_exception(char const *, ZorbaException::line_type, Diagnostic const &, parameters const &, location const &)
new_xquery_exceptionfriend XQueryException * new_xquery_exception(char const *, ZorbaException::line_type, Diagnostic const &, parameters const &, location const &)
serialization::operator&friend void serialization::operator&(serialization::Archiver &, ZorbaException *&)
set_appliedfriend void set_applied(ZorbaException &, char const *, line_type, column_type, line_type, column_type, bool)
set_datafriend void set_data(ZorbaException &, char const *, line_type, column_type, line_type, column_type, bool)
set_sourcefriend void set_source(ZorbaException &, char const *, line_type, column_type, line_type, column_type, bool)
UserExceptionfriend class UserException
Public 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.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=XQueryException & operator=(XQueryException const &from) Assigns this XQueryException 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.whatchar const * what() const
XQueryException XQueryException(XQueryException const &from) Copy-constructs an XQueryException.
Parameters
~XQueryException ~XQueryException() Destroys this XQueryException.
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 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
XQueryException XQueryException(serialization::Archiver &ar)
Protected Static Functionsprint_uribool print_uri(std::ostream &, char const *uri)
Private FunctionsXQueryException XQueryException(Diagnostic const &diagnostic, char const *raise_file, line_type raise_line, char const *message) Constructs an XQueryException.
Parameters
Private Static Functionsget_ios_trace_indexint get_ios_trace_index()
|