MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / FormatAndRaiseError

Method FormatAndRaiseError

CryScriptSystem/ScriptSystem.cpp:742–768  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

740//////////////////////////////////////////////////////////////////////
741//////////////////////////////////////////////////////////////////////
742void CScriptSystem::FormatAndRaiseError(int nErr)
743{
744 const char *sFuncName = NULL;
745 switch (nErr)
746 {
747 case 0: /*GetLog()->Log("ScriptSystem:Success!!!\n"); */
748 break;
749 case LUA_ERRRUN:
750 sFuncName = "undefined";
751 m_pSink->OnScriptError("", sFuncName, -1, "ScriptSystem:error while running the chunk");
752 break;
753 case LUA_ERRSYNTAX:
754 m_pSink->OnScriptError("", "", -1, "ScriptSystem:precompiling the file");
755 break;
756 case LUA_ERRMEM:
757 m_pSink->OnScriptError("", "", -1, "ScriptSystem:memory allocation error in");
758 break;
759 case LUA_ERRERR:
760 m_pSink->OnScriptError("", "", -1, "error while running _ERRORMESSAGE");
761 break;
762 case LUA_ERRFILE:
763 m_pSink->OnScriptError(m_strCurrentFile.c_str(), "", -1, "Error opening/parsing file ");
764 break;
765 default:
766 break;
767 };
768}
769
770//////////////////////////////////////////////////////////////////////
771//////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 2

OnScriptErrorMethod · 0.80
c_strMethod · 0.45

Tested by

no test coverage detected