Smart exception object. More...
#include <wave_ex.h>
Public Member Functions | |
wave_ex (const char *filename, int line) | |
~wave_ex (void) |
Smart exception object.
Once you create one of these on the stack it will automatically throw in the destructor. It can be caught as a std::exception.
Once you create it, use it like a stringstream.
Use the provided helper macro to construct the exception object, this will also provide the file and line number:
function(void) { if (something_bad()) { WAVE_EX(wex); wex << "Something bad just happened!"; wex << more_info(); wex << "Good luck!"; } // <-- automatically throws here }
Definition at line 84 of file wave_ex.h.
wave_ex::wave_ex | ( | const char * | filename, | |
int | line | |||
) | [inline] |