17 #ifndef ZORBA_ZORBA_EXCEPTION_API_H
18 #define ZORBA_ZORBA_EXCEPTION_API_H
24 #include <zorba/config.h>
32 namespace serialization {
34 void operator&( Archiver&, ZorbaException*& );
52 format_xml_indented = 3
91 return static_cast<print_format>( o.iword( get_ios_format_index() ) );
98 virtual void polymorphic_throw()
const;
106 diagnostic_ = &diagnostic;
115 return raise_file_.c_str();
134 o.iword( get_ios_format_index() ) =
static_cast<long>( f );
138 char const* what()
const throw();
152 line_type raise_line,
char const *message );
167 std::ostream& print( std::ostream& ) const;
169 virtual std::ostream& print_impl( std::ostream &o ) const;
173 std::
string raise_file_;
174 line_type raise_line_;
175 std::
string message_;
177 static
int get_ios_format_index();
183 internal::diagnostic::parameters const&
188 internal::diagnostic::parameters const&
191 friend std::ostream& operator<<( std::ostream&,
ZorbaException const& );
196 friend
void serialization::operator&( serialization::Archiver&,
209 inline std::ostream& operator<<( std::ostream &o, ZorbaException const &e ) {
std::ostream & print(std::ostream &) const
Prints the exception to the given ostream.
A ZorbaException is the base class for all Zorba exceptions.
static print_format get_print_format(std::ostream &o)
Gets the current print_format associated with the given ostream.
A Diagnostic is the base class for all Zorba diagnostics (errors and warnings).
unsigned line_type
The line-number type.
static void set_print_format(std::ostream &o, print_format f)
Sets the print_format of the given ostream.
char const * raise_file() const
Gets the C++ source-code file name whence this exception was raised.
line_type raise_line() const
Gets the C++ source-code line number whence this exception was raised.
void set_diagnostic(Diagnostic const &diagnostic)
Sets the diagnostic.
internal::diagnostic::location::line_type line_type
print_format
The format to print exceptions as to an ostream.
ZORBA_DLL_PUBLIC std::ostream & operator<<(std::ostream &os, const QueryLocation &aQuery)
void operator&(serialization::Archiver &, const Diagnostic *&)