equal
deleted
inserted
replaced
50 |
50 |
51 virtual const char* what() const throw() { |
51 virtual const char* what() const throw() { |
52 return buf.str().c_str(); |
52 return buf.str().c_str(); |
53 } |
53 } |
54 |
54 |
55 Exception& operator<<(std::string const& s) { buf << s; return *this; } |
55 template <typename T> |
56 Exception& operator<<(char const *s) { buf << s; return *this; } |
56 Exception& operator<<(T const& t) { buf << t; return *this; } |
57 Exception& operator<<(int i) { buf << i; return *this; } |
|
58 }; |
57 }; |
59 |
58 |
60 /** |
59 /** |
61 * \brief Generic error signaling function. |
60 * \brief Generic error signaling function. |
62 * |
61 * |
73 * modules under development. |
72 * modules under development. |
74 */ |
73 */ |
75 |
74 |
76 # define FIXME(msg) \ |
75 # define FIXME(msg) \ |
77 do { throw ::lemon::Exception() << "FIXME: " msg " (in: " \ |
76 do { throw ::lemon::Exception() << "FIXME: " msg " (in: " \ |
78 __FILE__ ", " << __LINE__ << ")"; \ |
77 __FILE__ ", " << __LINE__ << ")"; \ |
79 } while(false) |
78 } while(false) |
80 |
79 |
81 } |
80 } |
82 #endif // LEMON_ERROR_H |
81 #endif // LEMON_ERROR_H |