diff options
author | Robin Gareus <robin@gareus.org> | 2017-08-15 17:45:36 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-08-15 17:46:04 +0200 |
commit | c2afd958ba915fa324ec7ee4b86267a5b5581849 (patch) | |
tree | 4c36c815b5339374332e732927d14e47e8b4b5f9 | |
parent | 87a1a6b7ae164cfe2558c323d3896938b2f5ac30 (diff) |
Re-add template script debugging (after 7d48e80e)
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index fadbc0a7bb..c313813489 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -3923,6 +3923,14 @@ ARDOUR_UI::build_session (const std::string& path, const std::string& snap_name, return 0; } + +static void _lua_print (std::string s) { +#ifndef NDEBUG + std::cout << "LuaInstance: " << s << "\n"; +#endif + PBD::info << "LuaInstance: " << s << endmsg; +} + void ARDOUR_UI::meta_session_setup (const std::string& script_path) { @@ -3931,6 +3939,7 @@ ARDOUR_UI::meta_session_setup (const std::string& script_path) } LuaState lua; + lua.Print.connect (&_lua_print); lua.sandbox (true); lua_State* L = lua.getState(); @@ -3947,7 +3956,9 @@ ARDOUR_UI::meta_session_setup (const std::string& script_path) if (fn.isFunction()) { fn (); } - } catch (luabridge::LuaException const& e) { } + } catch (luabridge::LuaException const& e) { + cerr << "LuaException:" << e.what () << endl; + } } void |