forked from github/server
exception handling
This commit is contained in:
parent
5f30d635dc
commit
3fd66be379
|
@ -687,11 +687,7 @@ main(int argc, char *argv[])
|
|||
#else
|
||||
try {
|
||||
#endif
|
||||
if (lua_dofile(luaState, buf)!=0) {
|
||||
std::string errmsg = "Unknown error executing lua_dofile";
|
||||
if (lua_isstring(luaState, -1)) errmsg = lua_tostring(luaState, -1);
|
||||
throw std::runtime_error(errmsg);
|
||||
}
|
||||
luabind::call_function<int>(luaState, "dofile", buf);
|
||||
#ifndef LUABIND_NO_EXCEPTIONS
|
||||
}
|
||||
catch (std::runtime_error& rte) {
|
||||
|
|
|
@ -213,7 +213,8 @@ function test_parser()
|
|||
write_game("parser")
|
||||
end
|
||||
|
||||
test_handler()
|
||||
test_fail()
|
||||
-- test_handler()
|
||||
-- test_parser()
|
||||
-- test_monsters()
|
||||
-- test_combat()
|
||||
|
|
Loading…
Reference in New Issue