most of the 2.X->3.0 commit (up to rev 4299) except for gtk2_ardour/editor_canvas...
[ardour.git] / libs / ardour / audio_unit.cc
index 9c7ea0f13fda9b664c628989686ac27ebc0f7fb7..16d5e390f8610294f87dbe91ecd824bf7501d1af 100644 (file)
@@ -103,7 +103,15 @@ AUPlugin::~AUPlugin ()
 void
 AUPlugin::init ()
 {
-       OSErr err = CAAudioUnit::Open (*(comp.get()), *unit);
+       OSErr err;
+
+       try {
+               err = CAAudioUnit::Open (*(comp.get()), *unit);
+       } catch (...) {
+               error << _("Exception thrown during AudioUnit plugin loading - plugin ignored") << endmsg;
+               cerr << _("Exception thrown during AudioUnit plugin loading - plugin ignored") << endl;
+               throw failed_constructor();
+       }
 
        if (err != noErr) {
                error << _("AudioUnit: Could not convert CAComponent to CAAudioUnit") << endmsg;
@@ -1090,6 +1098,7 @@ AUPluginInfo::cached_io_configuration (const std::string& unique_id,
        } catch (...) {
 
                warning << string_compose (_("Could not load AU plugin %1 - ignored"), name) << endmsg;
+               cerr << string_compose (_("Could not load AU plugin %1 - ignored"), name) << endl;
                return false;
 
        }