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

📄 assert.cpp

📁 天之炼狱1服务器端源文件游戏服务端不完整
💻 CPP
字号:
//--------------------------------------------------------------------------------// // Filename   : Assert.cpp // Written By : Reiot////--------------------------------------------------------------------------------// include files#include "Types.h"#include "Assert.h"#include "Exception.h"#include <time.h>//--------------------------------------------------------------------------------//// __assert__//// 捞 窃荐俊辑绰 __BEGIN_TRY , __END_CATCH肺 wrapping且 鞘夸啊 绝促.////--------------------------------------------------------------------------------void __assert__ ( const char * file , uint line , const char * func , const char * expr )	throw ( AssertionError ){	StringStream msg;		msg << "\n"		<< "Assertion Failed : " << file << " : " << line;	if ( func )		msg << " : " << func;	time_t currentTime = time(0);		msg << expr << " at " << ctime(&currentTime);		ofstream ofile("assertion_failed.log",ios::app);	ofile << msg.toString() << endl;	ofile.close();	throw AssertionError( msg.toString() );}//--------------------------------------------------------------------------------//// 郴何俊 漂沥 蜡历甫 BAN 窍绊, 肺弊甫 巢扁绰 内靛啊 甸绢哎 荐 乐阑鳖?////--------------------------------------------------------------------------------void __protocol_assert__ ( const char * file , uint line , const char * func , const char * expr )	throw ( InvalidProtocolException ){	StringStream msg;		msg << "\n"		<< "Protocol Assertion Failed : " << file << " : " << line;	if ( func )		msg << " : " << func;	time_t currentTime = time(0);		msg << expr << " at " << ctime(&currentTime);		ofstream ofile("protocol_assertion_failed.log",ios::app);	ofile << msg.toString() << endl;	ofile.close();	throw InvalidProtocolException( msg.toString() );}

⌨️ 快捷键说明

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