Files
itgmania212121/stepmania/src/RageException.h
T

56 lines
2.0 KiB
C++
Raw Normal View History

2004-05-06 00:42:06 +00:00
/*
* RageException: Class for thowing fatal error exceptions
*/
#ifndef RAGEEXCEPTION_H
#define RAGEEXCEPTION_H
2002-06-14 22:25:22 +00:00
2002-07-03 21:27:26 +00:00
#include <exception>
2004-04-05 05:22:32 +00:00
#include <cstdarg>
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:
2003-12-21 21:34:01 +00:00
RageException( const CString &str );
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;
};
#endif
2004-05-06 00:42:06 +00:00
/*
* Copyright (c) 2001-2004 Chris Danford
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, and/or sell copies of the Software, and to permit persons to
* whom the Software is furnished to do so, provided that the above
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/