Files
itgmania212121/stepmania/src/RageException.h
T

38 lines
1010 B
C++
Raw Normal View History

#ifndef RAGEEXCEPTION_H
#define RAGEEXCEPTION_H
2002-06-14 22:25:22 +00:00
/*
-----------------------------------------------------------------------------
Class: RageError
Desc: Class for thowing fatal error exceptions
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
2002-07-03 21:27:26 +00:00
#include <exception>
2002-12-21 08:13:22 +00:00
#include <stdarg.h>
2002-06-14 22:25:22 +00:00
2002-09-07 09:44:55 +00:00
class RageException : public exception
2002-06-14 22:25:22 +00:00
{
public:
RageException( const char *fmt, ...);
2002-12-21 08:13:22 +00:00
RageException( const char *fmt, va_list va);
2002-06-14 22:25:22 +00:00
2002-11-16 06:56:25 +00:00
virtual const char *what() const throw();
2002-11-16 08:02:51 +00:00
virtual ~RageException() throw() { }
2002-06-14 22:25:22 +00:00
2002-12-21 18:32:06 +00:00
/* The only difference between these is that Throw triggers debug behavior
* and Nonfatal doesn't. Nonfatal is used when the exception happens
* normally and will be caught, such as when a driver fails to initialize. */
2002-12-22 03:19:46 +00:00
static void NORETURN Throw(const char *fmt, ...);
static void NORETURN ThrowNonfatal(const char *fmt, ...);
2002-12-21 08:13:22 +00:00
2002-06-14 22:25:22 +00:00
protected:
CString m_sError;
};
2002-12-21 08:13:22 +00:00
#endif