f8916ab31d
we were it's not being used everywhere it would need to be. If we want Unicode support, that's probably not the way to do it anyway ...)
47 lines
994 B
C++
47 lines
994 B
C++
#include "stdafx.h"
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
Class: RageLog
|
|
|
|
Desc: See header.
|
|
|
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
|
Chris Danford
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
|
|
#include "RageException.h"
|
|
#include "RageUtil.h"
|
|
|
|
#include "dxerr8.h"
|
|
#pragma comment(lib, "DxErr8.lib")
|
|
|
|
|
|
RageException::RageException( const char *fmt, ...)
|
|
{
|
|
va_list va;
|
|
va_start(va, fmt);
|
|
m_sError = vssprintf( fmt, va );
|
|
#ifdef _DEBUG
|
|
MessageBox( NULL, m_sError, "Fatal Error", MB_OK );
|
|
DebugBreak();
|
|
#endif
|
|
}
|
|
|
|
RageException::RageException( HRESULT hr, const char *fmt, ...)
|
|
{
|
|
va_list va;
|
|
va_start(va, fmt);
|
|
m_sError = vssprintf( fmt, va );
|
|
m_sError += ssprintf( "(%s)", DXGetErrorString8(hr) );
|
|
#ifdef _DEBUG
|
|
MessageBox( NULL, m_sError, "Fatal Error", MB_OK );
|
|
DebugBreak();
|
|
#endif
|
|
}
|
|
|
|
const char* RageException::what() const
|
|
{
|
|
return m_sError;
|
|
}
|