add back-pointer to TempoMap from points, and push dirty=true into map
[ardour.git] / gtk2_ardour / luawindow.cc
index beb2cc0356a2c009cd312051a15ca9aa78f75cbf..89a1d387aa490cfdb1ea058c80a803842d8d1cfc 100644 (file)
@@ -199,6 +199,7 @@ void LuaWindow::reinit_lua ()
        delete lua;
        lua = new LuaState();
        lua->Print.connect (sigc::mem_fun (*this, &LuaWindow::append_text));
+       lua->sandbox (false);
 
        lua_State* L = lua->getState();
        LuaInstance::register_classes (L);
@@ -285,6 +286,12 @@ LuaWindow::run_script ()
                        }
                } catch (luabridge::LuaException const& e) {
                        append_text (string_compose (_("LuaException: %1"), e.what()));
+               } catch (Glib::Exception const& e) {
+                       append_text (string_compose (_("Glib Exception: %1"), e.what()));
+               } catch (std::exception const& e) {
+                       append_text (string_compose (_("C++ Exception: %1"), e.what()));
+               } catch (...) {
+                       append_text (string_compose (_("C++ Exception: %1"), "..."));
                }
        } else {
                // script with factory method
@@ -303,6 +310,12 @@ LuaWindow::run_script ()
                        lua->do_command ("factory = nil;");
                } catch (luabridge::LuaException const& e) {
                        append_text (string_compose (_("LuaException: %1"), e.what()));
+               } catch (Glib::Exception const& e) {
+                       append_text (string_compose (_("Glib Exception: %1"), e.what()));
+               } catch (std::exception const& e) {
+                       append_text (string_compose (_("C++ Exception: %1"), e.what()));
+               } catch (...) {
+                       append_text (string_compose (_("C++ Exception: %1"), "..."));
                }
        }
 }