Public Member Functions

wave_ex Class Reference

Smart exception object. More...

#include <wave_ex.h>

List of all members.

Public Member Functions

 wave_ex (const char *filename, int line)
 ~wave_ex (void)

Detailed Description

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.


Constructor & Destructor Documentation

wave_ex::wave_ex ( const char *  filename,
int  line 
) [inline]

Definition at line 86 of file wave_ex.h.

wave_ex::~wave_ex ( void   )  [inline]

Definition at line 92 of file wave_ex.h.


The documentation for this class was generated from the following file: