Files
itgmania212121/stepmania/src/RageException.cpp
T

47 lines
994 B
C++
Raw Normal View History

2002-06-14 22:25:22 +00:00
#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, ...)
2002-06-14 22:25:22 +00:00
{
va_list va;
va_start(va, fmt);
m_sError = vssprintf( fmt, va );
#ifdef _DEBUG
2002-07-03 21:27:26 +00:00
MessageBox( NULL, m_sError, "Fatal Error", MB_OK );
2002-06-14 22:25:22 +00:00
DebugBreak();
#endif
}
RageException::RageException( HRESULT hr, const char *fmt, ...)
2002-06-14 22:25:22 +00:00
{
va_list va;
va_start(va, fmt);
m_sError = vssprintf( fmt, va );
m_sError += ssprintf( "(%s)", DXGetErrorString8(hr) );
#ifdef _DEBUG
2002-07-03 21:27:26 +00:00
MessageBox( NULL, m_sError, "Fatal Error", MB_OK );
2002-06-14 22:25:22 +00:00
DebugBreak();
#endif
}
2002-07-03 21:27:26 +00:00
const char* RageException::what() const
{
return m_sError;
}