⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lithexception.h

📁 Blood 2全套源码
💻 H
字号:
#ifndef __LITHEXCEPTION_H__
#define __LITHEXCEPTION_H__


	#define LITH_EXCEPTION		0
	#define LITH_MEMEXCEPTION	1

	
	// Use these instead of regular try and catch.
	#ifdef STDLITH_MFC
		#define LithTry			try { try
		#define LithCatch		catch( CMemoryException *__memory_exception ) \
								{ __memory_exception->Delete(); throw CLithMemException(); } } catch
		#define LithExtraCatch	catch
	#else
		#define LithTry			try
		#define LithCatch		catch
		#define LithExtraCatch	catch
	#endif												 



	extern int g_LithExceptionType;


	// This is the base exception class for all StdLith exceptions, and
	// you can derive your own exception type from it if you want.
	class CLithException
	{
		public:

						CLithException()				{ SetExceptionType(LITH_EXCEPTION); }

			void		SetExceptionType( int type )	{ g_LithExceptionType = type; }
			int			GetExceptionType()				{ return g_LithExceptionType; }

	};


	// Use this for your memory allocation exceptions.
	class CLithMemException : public CLithException
	{
		public:
			
						CLithMemException()		{ SetExceptionType(LITH_MEMEXCEPTION); }

	};


#endif  // __LITHEXCEPTION_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -