diff options
author | Robin Gareus <robin@gareus.org> | 2017-08-19 01:05:18 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-08-19 01:06:44 +0200 |
commit | fb745cc5a882cd4e3a49ff1f565cb69a65575993 (patch) | |
tree | 90dfcfeffabe50c4bdbf889bf0249a901b8b9b93 /libs/ardour/luaproc.cc | |
parent | 2a9bf034bb21eb684c75711c97f6f730397140ee (diff) |
Lua may call C++ functions with throw. Catch them
Diffstat (limited to 'libs/ardour/luaproc.cc')
-rw-r--r-- | libs/ardour/luaproc.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libs/ardour/luaproc.cc b/libs/ardour/luaproc.cc index 6581743771..c1fd455cdf 100644 --- a/libs/ardour/luaproc.cc +++ b/libs/ardour/luaproc.cc @@ -238,8 +238,7 @@ LuaProc::load_script () try { lua_dsp_init (_session.nominal_frame_rate ()); } catch (luabridge::LuaException const& e) { - ; - } + } catch (...) { } } _ctrl_params.clear (); @@ -354,6 +353,8 @@ LuaProc::can_support_io_configuration (const ChanCount& in, ChanCount& out, Chan } } catch (luabridge::LuaException const& e) { _iotable = NULL; + } catch (...) { + _iotable = NULL; } } @@ -584,6 +585,8 @@ LuaProc::configure_io (ChanCount in, ChanCount out) std::cerr << "LuaException: " << e.what () << "\n"; #endif return false; + } catch (...) { + return false; } } } @@ -734,6 +737,8 @@ LuaProc::connect_and_run (BufferSet& bufs, std::cerr << "LuaException: " << e.what () << "\n"; #endif return -1; + } catch (...) { + return -1; } #ifdef WITH_LUAPROC_STATS int64_t t1 = g_get_monotonic_time (); |