projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f33d316
)
Fix LuaJIT exception wrapper
author
Kahrl
<kahrl@gmx.net>
Sat, 23 Aug 2014 12:30:51 +0000
(14:30 +0200)
committer
Kahrl
<kahrl@gmx.net>
Sat, 23 Aug 2014 18:41:03 +0000
(20:41 +0200)
src/script/common/c_internal.cpp
patch
|
blob
|
history
diff --git
a/src/script/common/c_internal.cpp
b/src/script/common/c_internal.cpp
index 4c098f8d59a499770adc763bb270c1e07a6bd56c..f811dd5d31b545aaf73daed57d5be2ab5d0ec46a 100644
(file)
--- 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.
}