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
|
#else
|
||||||
try {
|
try {
|
||||||
#endif
|
#endif
|
||||||
if (lua_dofile(luaState, buf)!=0) {
|
luabind::call_function<int>(luaState, "dofile", buf);
|
||||||
std::string errmsg = "Unknown error executing lua_dofile";
|
|
||||||
if (lua_isstring(luaState, -1)) errmsg = lua_tostring(luaState, -1);
|
|
||||||
throw std::runtime_error(errmsg);
|
|
||||||
}
|
|
||||||
#ifndef LUABIND_NO_EXCEPTIONS
|
#ifndef LUABIND_NO_EXCEPTIONS
|
||||||
}
|
}
|
||||||
catch (std::runtime_error& rte) {
|
catch (std::runtime_error& rte) {
|
||||||
|
|
|
@ -213,7 +213,8 @@ function test_parser()
|
||||||
write_game("parser")
|
write_game("parser")
|
||||||
end
|
end
|
||||||
|
|
||||||
test_handler()
|
test_fail()
|
||||||
|
-- test_handler()
|
||||||
-- test_parser()
|
-- test_parser()
|
||||||
-- test_monsters()
|
-- test_monsters()
|
||||||
-- test_combat()
|
-- test_combat()
|
||||||
|
|
Loading…
Reference in New Issue