-
-
Save chbruyand/586820716b128cf680d12599fd46adc7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ext/luawrapper/include/LuaContext.hpp b/ext/luawrapper/include/LuaContext.hpp | |
index 8075aea79..fd22605c4 100644 | |
--- a/ext/luawrapper/include/LuaContext.hpp | |
+++ b/ext/luawrapper/include/LuaContext.hpp | |
@@ -2366,9 +2366,15 @@ private: | |
lua_pushstring(state, ex.luaType.c_str()); | |
lua_pushstring(state, " to "); | |
lua_pushstring(state, ex.destination.name()); | |
- lua_concat(state, 4); | |
+ lua_concat(state, 5); | |
luaError(state); | |
+ } catch (const std::exception& e) { | |
+ luaL_where(state, 1); | |
+ lua_pushstring(state, "Caught exception: "); | |
+ lua_pushstring(state, e.what()); | |
+ lua_concat(state, 3); | |
+ luaError(state); | |
} catch (...) { | |
Pusher<std::exception_ptr>::push(state, std::current_exception()).release(); | |
luaError(state); |
IMO (I don't get why it was 4)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't quite get the change on line 9,/10 is that a bug fix?