mbo::mbo_exception< base_exception, _str_type > Class Template Reference

Stack Trace logging exception adapter. More...

#include <MboDebugTrace.h>

Inheritance diagram for mbo::mbo_exception< base_exception, _str_type >:

Inheritance graph
{mbo::CAlreadyEntered\n||+ CAlreadyEntered()\l}{mbo::NullPointer\< _Ty \>::nullptr_access\n||+ nullptr_access()\l}{mbo::string_conversion_error\n||+ string_conversion_error()\l}{base_exception\n||}{mbo::mbo_stack_trace\n|# m_strStackTrace\l|+ mbo_stack_trace()\l+ mbo_stack_trace()\l+ get_stack_trace()\l}
[legend]
Collaboration diagram for mbo::mbo_exception< base_exception, _str_type >:

Collaboration graph
{base_exception\n||}{mbo::mbo_stack_trace\n|# m_strStackTrace\l|+ mbo_stack_trace()\l+ mbo_stack_trace()\l+ get_stack_trace()\l}
[legend]

List of all members.

Public Types

typedef copy_arg_info
< _str_type >::argument_t 
str_arg
typedef copy_arg_info
< _str_type >::variable_t 
str_var

Public Member Functions

 mbo_exception ()
 default constructor
 mbo_exception (str_arg msg)
 
Parameters:
msg message for exception, typically the reason


Static Public Member Functions

static const char * get_exception_name ()
 
Returns:
class name not including "class " prefix


Detailed Description

template<class base_exception, typename _str_type = std::string&>
class mbo::mbo_exception< base_exception, _str_type >

Stack Trace logging exception adapter.

This base class is used to extend STL exceptions by stacktrace logging.

Definition at line 142 of file MboDebugTrace.h.


Member Typedef Documentation

template<class base_exception, typename _str_type = std::string&>
typedef copy_arg_info<_str_type>::argument_t mbo::mbo_exception< base_exception, _str_type >::str_arg

Definition at line 146 of file MboDebugTrace.h.

template<class base_exception, typename _str_type = std::string&>
typedef copy_arg_info<_str_type>::variable_t mbo::mbo_exception< base_exception, _str_type >::str_var

Definition at line 147 of file MboDebugTrace.h.


Constructor & Destructor Documentation

template<class base_exception, typename _str_type = std::string&>
mbo::mbo_exception< base_exception, _str_type >::mbo_exception (  )  [inline]

default constructor

Definition at line 167 of file MboDebugTrace.h.

References mbo::mbo_stack_trace::get_stack_trace().

00168         : base_exception(str_arg(get_exception_name()))
00169         , mbo_stack_trace(4)
00170     {
00171         OutputDebugString(what());
00172         OutputDebugString("\n");
00173         OutputDebugString(get_stack_trace().c_str());
00174     }

Here is the call graph for this function:

mbo::mbo_stack_trace::get_stack_trace

template<class base_exception, typename _str_type = std::string&>
mbo::mbo_exception< base_exception, _str_type >::mbo_exception ( str_arg  msg  )  [inline, explicit]

Parameters:
msg message for exception, typically the reason

Definition at line 178 of file MboDebugTrace.h.

References mbo::mbo_stack_trace::get_stack_trace().

00179         : base_exception(str_arg((std::string(get_exception_name()) + ": " + msg).c_str()))
00180         , mbo_stack_trace(4)
00181     {
00182         OutputDebugString(what());
00183         OutputDebugString("\n");
00184         OutputDebugString(get_stack_trace().c_str());
00185     }

Here is the call graph for this function:

mbo::mbo_stack_trace::get_stack_trace


Member Function Documentation

template<class base_exception, typename _str_type = std::string&>
static const char* mbo::mbo_exception< base_exception, _str_type >::get_exception_name (  )  [inline, static]

Returns:
class name not including "class " prefix

Definition at line 151 of file MboDebugTrace.h.

00152     {
00153         const char *szName = typeid(base_exception).name();
00154 
00155         if (!strncmp(szName, "class ", sizeof("class ")-1))
00156         {
00157             return szName + sizeof("class ") - 1;
00158         }
00159         else
00160         {
00161             return szName;
00162         }
00163     }


The documentation for this class was generated from the following file:
  Hosted on code.google.com  
© Marcus Börger
Generated on Fri Jan 18 21:21:11 2008 for MBO-lib by doxygen 1.5.4