本文整理汇总了C++中MOAILuaState::PrintStackTrace方法的典型用法代码示例。如果您正苦于以下问题:C++ MOAILuaState::PrintStackTrace方法的具体用法?C++ MOAILuaState::PrintStackTrace怎么用?C++ MOAILuaState::PrintStackTrace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MOAILuaState
的用法示例。
在下文中一共展示了MOAILuaState::PrintStackTrace方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LogVar
//----------------------------------------------------------------//
void MOAILogMgr::LogVar ( lua_State *L, u32 messageID, va_list args ) {
if ( this->mLevel ) {
MessageMapIt messageMapIt = this->mMessageMap.find ( messageID );
if ( messageMapIt != this->mMessageMap.end ()) {
MOAILogMessage& message = messageMapIt->second;
if ( message.mLevel <= this->mLevel ) {
if ( L ) {
this->Print ( "----------------------------------------------------------------\n" );
}
this->PrintVar ( message.mFormatString, args );
this->Print ( "\n" );
if ( L ) {
MOAILuaState state ( L );
state.PrintStackTrace ( this->mFile, 0 );
this->Print ( "\n" );
}
}
}
}
}
示例2: _tombstone
//----------------------------------------------------------------//
int MOAILuaObject::_tombstone ( lua_State* L ) {
MOAILuaState state ( L );
ZLLog::Print ( "----------------------------------------------------------------\n" );
ZLLog::Print ( "ERROR: Attempt to access missing object instance.\n" );
state.PrintStackTrace ( ZLLog::CONSOLE, 0 );
ZLLog::Print ( "\n" );
return 0;
}
示例3: _panic
//----------------------------------------------------------------//
int MOAILuaRuntime::_panic ( lua_State *L ) {
MOAILuaState state ( L );
state.PrintStackTrace ( ZLLog::CONSOLE, 1 );
#ifdef ANDROID
ZLLog::Print ( "PANIC: unprotected error in call to Lua API (%s)\n", lua_tostring ( L, -1 ));
#else
fprintf ( stderr, "PANIC: unprotected error in call to Lua API (%s)\n", lua_tostring ( L, -1 ));
#endif
return 0;
}