Main ThrowStream class.
More...
#include <ThrowStream.h>
|
| ThrowStream (const unsigned long line, const string &file, const string &function) |
| Construct using the line, file, and function. More...
|
|
| ThrowStream (const exception &ex, unsigned long line, const string &file, const string &function) |
| Construct by copying an exception and adding a new line, file, and function. More...
|
|
| ~ThrowStream () throw () |
| Destructor definition needed to declare it throw() More...
|
|
ThrowStream & | Append (const unsigned long line, const string &file, const string &function) |
| Add a new line to the backtrace. More...
|
|
ThrowStream & | Append (const exception &ex, const unsigned long line, const string &file, const string &function) |
| Add a new line to the backtrace, copying an existing exception. More...
|
|
char const * | what () const throw () |
| Get the description as a character array. More...
|
|
template<typename T > |
ThrowStream & | operator<< (const T &rhs) |
| Add information to the current entry in the backtrace. More...
|
|
Main ThrowStream class.
This class allows appending of exception information, creating a backtrace-like output.
Definition at line 32 of file ThrowStream.h.
ThrowStream::ThrowStream |
( |
const unsigned long |
line, |
|
|
const string & |
file, |
|
|
const string & |
function |
|
) |
| |
|
inline |
Construct using the line, file, and function.
- Parameters
-
[in] | line | The line on which the exception occurred |
[in] | file | The file in which the exception occurred |
[in] | function | function The function in which the exception occurred |
Definition at line 47 of file ThrowStream.h.
ThrowStream::ThrowStream |
( |
const exception & |
ex, |
|
|
unsigned long |
line, |
|
|
const string & |
file, |
|
|
const string & |
function |
|
) |
| |
|
inline |
Construct by copying an exception and adding a new line, file, and function.
- Parameters
-
[in] | ex | An exception to copy |
[in] | line | The line on which the exception occurred |
[in] | file | The file in which the exception occurred |
[in] | function | function The function in which the exception occurred |
Definition at line 60 of file ThrowStream.h.
ThrowStream::~ThrowStream |
( |
) | |
|
throw | ( | |
| ) | | |
|
inline |
Destructor definition needed to declare it throw()
Definition at line 66 of file ThrowStream.h.
ThrowStream& ThrowStream::Append |
( |
const unsigned long |
line, |
|
|
const string & |
file, |
|
|
const string & |
function |
|
) |
| |
|
inline |
Add a new line to the backtrace.
This returns ThrowStream & to allow using operator<<
- Parameters
-
[in] | line | The line on which the exception occurred |
[in] | file | The file in which the exception occurred |
[in] | function | function The function in which the exception occurred |
Definition at line 77 of file ThrowStream.h.
ThrowStream& ThrowStream::Append |
( |
const exception & |
ex, |
|
|
const unsigned long |
line, |
|
|
const string & |
file, |
|
|
const string & |
function |
|
) |
| |
|
inline |
Add a new line to the backtrace, copying an existing exception.
This returns ThrowStream & to allow using operator<<
- Parameters
-
[in] | ex | An exception to copy |
[in] | line | The line on which the exception occurred |
[in] | file | The file in which the exception occurred |
[in] | function | function The function in which the exception occurred |
Definition at line 102 of file ThrowStream.h.
Add information to the current entry in the backtrace.
- Parameters
-
[in] | rhs | Data to add. This must be able to be inserted into a stringstream object. |
- Returns
- The modified ThrowStream object
Definition at line 143 of file ThrowStream.h.
char const* ThrowStream::what |
( |
) | |
const |
throw | ( | |
| ) | | |
|
inline |
Get the description as a character array.
This will output a (hopefully) nice backtrace
- Returns
- An array of characters representing the backtrace
Definition at line 130 of file ThrowStream.h.
ostream& operator<< |
( |
ostream & |
os, |
|
|
const ThrowStream & |
ts |
|
) |
| |
|
friend |
Allow output to an ostream using the stream operator.
- Parameters
-
[in,out] | os | An ostream object to output to |
[in] | ts | A throwstream object to output |
- Returns
- The ostream object again
string ThrowStream::_desc |
|
private |
The documentation for this class was generated from the following file: