exception handling

This commit is contained in:
Enno Rehling 2004-09-26 19:15:36 +00:00
parent 5f30d635dc
commit 3fd66be379
2 changed files with 3 additions and 6 deletions

View File

@ -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) {

View File

@ -213,7 +213,8 @@ function test_parser()
write_game("parser")
end
test_handler()
test_fail()
-- test_handler()
-- test_parser()
-- test_monsters()
-- test_combat()