17 #ifndef ZORBA_XQUERY_EXCEPTION_API_H
18 #define ZORBA_XQUERY_EXCEPTION_API_H
25 namespace serialization {
27 void operator&( Archiver&, ZorbaException*& );
77 bool has_source() const throw() {
90 void set_source(
char const *uri,
92 column_type column = 0,
93 line_type line_end = 0,
94 column_type column_end = 0 );
102 return source_loc_.file();
111 return source_loc_.line();
120 return source_loc_.column();
129 return source_loc_.line_end();
138 return source_loc_.column_end();
161 void set_data(
char const *uri,
163 column_type column = 0,
164 line_type line_end = 0,
165 column_type column_end = 0 );
173 return data_loc_.file();
182 return data_loc_.line();
191 return data_loc_.column();
200 return data_loc_.line_end();
209 return data_loc_.column_end();
234 void set_applied(
char const *uri,
236 column_type column = 0,
237 line_type line_end = 0,
238 column_type column_end = 0 );
246 return applied_loc_.file();
255 return applied_loc_.line();
265 return applied_loc_.column();
275 return applied_loc_.line_end();
285 return applied_loc_.column_end();
298 return !!( o.iword( get_ios_trace_index() ) );
327 o.iword( get_ios_trace_index() ) = print;
333 void polymorphic_throw()
const;
336 std::ostream& print_stack_trace( std::ostream& )
const;
337 static bool print_uri( std::ostream&,
char const *uri );
341 std::ostream& print_impl( std::ostream& )
const;
358 line_type raise_line,
char const *message );
360 location source_loc_;
362 location applied_loc_;
365 static int get_ios_trace_index();
369 parameters
const&, location
const&
374 parameters
const&, location
const&
377 friend void set_applied(
ZorbaException&,
char const*, line_type, column_type,
378 line_type, column_type,
bool );
380 friend void set_data(
ZorbaException&,
char const*, line_type, column_type,
381 line_type, column_type,
bool );
383 friend void set_source(
ZorbaException&,
char const*, line_type, column_type,
384 line_type, column_type,
bool );