# # # patch "lua.hh" # from [91180f986cbe192aa5d1fd9fd0146a1150b789cc] # to [146872f14cc23c6179c37bcda8667a0ecd178826] # ============================================================ --- lua.hh 91180f986cbe192aa5d1fd9fd0146a1150b789cc +++ lua.hh 146872f14cc23c6179c37bcda8667a0ecd178826 @@ -105,7 +105,11 @@ namespace luaext { \ extern "C" { \ static int TABLE ## _ ## NAME ## _for_lua(lua_State * LS) \ { \ - return TABLE ## _ ## NAME ## _extfn . call(LS); \ + try { \ + return TABLE ## _ ## NAME ## _extfn . call(LS); \ + } catch (std::exception & e) { \ + return luaL_error(LS, e.what()); \ + } \ } \ } \ extfn_ ## NAME ## _ ## TABLE :: extfn_ ## NAME ## _ ## TABLE () \