/*---------------------------------------------------------------------------*/ void lua_tinker::print_error(lua_State *L, const char* fmt, ...) { char text[4096]; va_list args; va_start(args, fmt); vsprintf(text, fmt, args); va_end(args); lua_getglobal(L, "_ALERT"); if(lua_isfunction(L, -1)) { lua_pushstring(L, text); lua_call(L, 1, 0); } else { //ERROR_LOG("%s", text); lua_pop(L, 1); } //assert( false ); OnErrorEvent( text ); }
void IEventChannel::OnError() { DetachFromLoop(); OnErrorEvent(*this); }