diff --git a/src/lay/lay/layMacroEditorDialog.cc b/src/lay/lay/layMacroEditorDialog.cc index 897a996cd..688990ee1 100644 --- a/src/lay/lay/layMacroEditorDialog.cc +++ b/src/lay/lay/layMacroEditorDialog.cc @@ -786,7 +786,9 @@ MacroEditorDialog::configure (const std::string &name, const std::string &value) } else if (name == cfg_macro_editor_font_size) { int v = m_font_size; - tl::from_string (value, v); + if (! value.empty ()) { + tl::from_string (value, v); + } if (v != m_font_size) { m_font_size = v; m_needs_update = true; @@ -3475,7 +3477,7 @@ public: options.push_back (std::pair (cfg_macro_editor_save_all_on_run, "false")); options.push_back (std::pair (cfg_macro_editor_debugging_enabled, "true")); options.push_back (std::pair (cfg_macro_editor_file_watcher_enabled, "true")); - options.push_back (std::pair (cfg_macro_editor_font_size, "0")); + options.push_back (std::pair (cfg_macro_editor_font_size, "")); options.push_back (std::pair (cfg_macro_editor_font_family, "")); options.push_back (std::pair (cfg_macro_editor_stop_on_exception, "true")); options.push_back (std::pair (cfg_macro_editor_tab_width, "8")); diff --git a/src/laybasic/laybasic/layPlugin.cc b/src/laybasic/laybasic/layPlugin.cc index 38f0b8b6f..f59f597e7 100644 --- a/src/laybasic/laybasic/layPlugin.cc +++ b/src/laybasic/laybasic/layPlugin.cc @@ -27,6 +27,7 @@ #include "tlException.h" #include "tlAssert.h" #include "tlXMLParser.h" +#include "tlLog.h" #include "layPlugin.h" #include "tlExceptions.h" @@ -37,6 +38,7 @@ #include #include #include +#include namespace lay { @@ -293,8 +295,12 @@ Plugin::config_set (const std::string &name, const std::string &value) // look for plugins that receive that configuration statically if the root is addressed if (! mp_parent && ! m_standalone) { for (tl::Registrar::iterator cls = tl::Registrar::begin (); cls != tl::Registrar::end (); ++cls) { - if ((const_cast (&*cls))->configure (name, value)) { - return; + try { + if ((const_cast (&*cls))->configure (name, value)) { + return; + } + } catch (tl::Exception &ex) { + tl::error << tl::to_string (QObject::tr ("Error on configure")) << " " << name << "='" << value << "': " << ex.msg (); } } } @@ -381,9 +387,13 @@ Plugin::do_config_end () bool Plugin::do_config_set (const std::string &name, const std::string &value) { - if (configure (name, value)) { - // taken by us - don't propagate to the children - return true; + try { + if (configure (name, value)) { + // taken by us - don't propagate to the children + return true; + } + } catch (tl::Exception &ex) { + tl::error << tl::to_string (QObject::tr ("Error on configure")) << " " << name << "='" << value << "': " << ex.msg (); } // propagate to all children (not only the first that takes it!)