summaryrefslogtreecommitdiff
path: root/Editor/EditorMain.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-10-18 23:20:28 +0800
committerchai <chaifix@163.com>2021-10-18 23:20:28 +0800
commit45c05ac5610416e75a123995af649681d43adf7f (patch)
treea4373cc0589cd1d7f3c1d6c5ab75d9b41767c9b6 /Editor/EditorMain.cpp
parent83474a5ec3a25da9f66192f03f9b0628ad219404 (diff)
* lua error handle
Diffstat (limited to 'Editor/EditorMain.cpp')
-rw-r--r--Editor/EditorMain.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Editor/EditorMain.cpp b/Editor/EditorMain.cpp
index 67ddc38..f8ee4ef 100644
--- a/Editor/EditorMain.cpp
+++ b/Editor/EditorMain.cpp
@@ -35,6 +35,11 @@ static int MainLoop()
return (INT)msg.wParam;
}
+void ErrorHandle(cc8* msg)
+{
+ log_error(std::string("[Lua] ") + msg);
+}
+
void InitLuaState()
{
LuaBind::VM vm;
@@ -45,7 +50,7 @@ void InitLuaState()
log_error("Can't setup scripting.");
}
LuaBind::State state = vm.GetMainState();
- state.DoFile("./Scripts/EditorApplication.lua");
+ state.DoFile("./Scripts/EditorApplication.lua", ErrorHandle);
}
#ifdef GAMELAB_DEBUG