Skip to content

Commit 3e267a6

Browse files
committedAug 23, 2014
Fix LuaJIT exception wrapper
1 parent f33d316 commit 3e267a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/script/common/c_internal.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ int script_exception_wrapper(lua_State *L, lua_CFunction f)
6464
return f(L); // Call wrapped function and return result.
6565
} catch (const char *s) { // Catch and convert exceptions.
6666
lua_pushstring(L, s);
67-
} catch (LuaError& e) {
67+
} catch (std::exception& e) {
6868
lua_pushstring(L, e.what());
69+
} catch (...) {
70+
lua_pushliteral(L, "caught (...)");
6971
}
7072
return lua_error(L); // Rethrow as a Lua error.
7173
}

0 commit comments

Comments
 (0)
Please sign in to comment.