Exception with context information. More...
#include <shellclasses.h>
Public Types | |
typedef COMExceptionBase | super |
Public Member Functions | |
COMException (HRESULT hr) | |
COMException (HRESULT hr, const char *file, int line) | |
COMException (HRESULT hr, const String &obj) | |
COMException (HRESULT hr, const String &obj, const char *file, int line) | |
String | toString () const |
Public Attributes | |
Context | _context |
const char * | _file |
int | _line |
Exception with context information.
Definition at line 113 of file shellclasses.h.
typedef COMExceptionBase COMException::super |
Definition at line 115 of file shellclasses.h.
COMException::COMException | ( | HRESULT | hr ) | [inline] |
Definition at line 117 of file shellclasses.h.
References CURRENT_CONTEXT, LOG, and toString().
: super(hr), _context(CURRENT_CONTEXT), _file(NULL), _line(0) { LOG(toString()); LOG(CURRENT_CONTEXT.getStackTrace()); }
COMException::COMException | ( | HRESULT | hr, |
const char * | file, | ||
int | line | ||
) | [inline] |
Definition at line 126 of file shellclasses.h.
References CURRENT_CONTEXT, LOG, and toString().
: super(hr), _context(CURRENT_CONTEXT), _file(file), _line(line) { LOG(toString()); LOG(CURRENT_CONTEXT.getStackTrace()); }
COMException::COMException | ( | HRESULT | hr, |
const String & | obj | ||
) | [inline] |
Definition at line 135 of file shellclasses.h.
References CURRENT_CONTEXT, LOG, and toString().
: super(hr), _context(CURRENT_CONTEXT), _file(NULL), _line(0) { LOG(toString()); LOG(CURRENT_CONTEXT.getStackTrace()); }
COMException::COMException | ( | HRESULT | hr, |
const String & | obj, | ||
const char * | file, | ||
int | line | ||
) | [inline] |
Definition at line 144 of file shellclasses.h.
References CURRENT_CONTEXT, LOG, and toString().
: super(hr), _context(CURRENT_CONTEXT), _file(file), _line(line) { LOG(toString()); LOG(CURRENT_CONTEXT.getStackTrace()); }
String COMException::toString | ( | ) | const |
Definition at line 70 of file shellclasses.cpp.
References _context, _file, _line, _stprintf_s2, BUFFER_LEN, TEXT, and Context::toString().
Referenced by COMException(), and HandleException().
{ TCHAR msg[4*BUFFER_LEN]; #ifdef __STDC_WANT_SECURE_LIB__ int l = 4*BUFFER_LEN; #endif LPTSTR p = msg; int n = _stprintf_s2(p, l, TEXT("%s\nContext: %s"), super::ErrorMessage(), (LPCTSTR)_context.toString()); p += n; #ifdef __STDC_WANT_SECURE_LIB__ l -= n; #endif if (_file) p += _stprintf_s2(p, l, TEXT("\nLocation: %hs:%d"), _file, _line); return msg; }
Definition at line 155 of file shellclasses.h.
Referenced by toString().
const char* COMException::_file |
Definition at line 157 of file shellclasses.h.
Referenced by toString().
Definition at line 158 of file shellclasses.h.
Referenced by toString().
ROS Explorer Source Code Documentation
generated on 02.01.2013 by ![]() |