55 friend ostream& operator << ( ostream& os,
Exception& a ) {
64 friend ostream& operator << ( ostream& os,
Exception* a ) {
90 Exception(
const string& arg ) : runtime_error( arg ) {
100 deque<string>::const_iterator
begin( )
const {
101 return exception_queue.begin( );
107 deque<string>::const_iterator
end( )
const {
108 return exception_queue.end( );
115 return exception_queue[ 0 ];
121 void set_message(
const string& msg );
123 void set_rethrow_message(
const string& file,
const int linenum );
125 const char* what()
const throw();
131 deque<
string> exception_queue;
136 virtual
void print( ostream& os=cerr ) const;
142 #define RETHROWME( arg ) {arg.set_rethrow_message( __FILE__, __LINE__ ); throw arg;}