aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2014-08-23 14:30:51 +0200
committerKahrl <kahrl@gmx.net>2014-08-23 20:41:03 +0200
commit3e267a6ece99b0affa1e0d5c15fb21c1b60dd63d (patch)
tree2aa81c9c1fe04dcb6a554191635f24ff75bd132c /src
parentf33d31693ed2ab7d2a29320181b6aba2c12f76d3 (diff)
downloadminetest-3e267a6ece99b0affa1e0d5c15fb21c1b60dd63d.tar.gz
minetest-3e267a6ece99b0affa1e0d5c15fb21c1b60dd63d.tar.bz2
minetest-3e267a6ece99b0affa1e0d5c15fb21c1b60dd63d.zip
Fix LuaJIT exception wrapper
Diffstat (limited to 'src')
-rw-r--r--src/script/common/c_internal.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/script/common/c_internal.cpp b/src/script/common/c_internal.cpp
index 4c098f8d5..f811dd5d3 100644
--- a/src/script/common/c_internal.cpp
+++ b/src/script/common/c_internal.cpp
@@ -64,8 +64,10 @@ int script_exception_wrapper(lua_State *L, lua_CFunction f)
return f(L); // Call wrapped function and return result.
} catch (const char *s) { // Catch and convert exceptions.
lua_pushstring(L, s);
- } catch (LuaError& e) {
+ } catch (std::exception& e) {
lua_pushstring(L, e.what());
+ } catch (...) {
+ lua_pushliteral(L, "caught (...)");
}
return lua_error(L); // Rethrow as a Lua error.
}