summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-11-08 16:44:12 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-11-08 16:44:12 +0000
commit329e8ec783c6bb45f61ce94fd7128aadb18a3f7b (patch)
tree4aa6b695819a6dd72ab1b4a1e7e211950f3b9be8
parent32b760d4c708a9d621d06aaa66e11e7c73d2e64d (diff)
catch exceptions while loading AudioUnits
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4111 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/ardour/audio_unit.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc
index d3a082824f..5d9a2d82e7 100644
--- a/libs/ardour/audio_unit.cc
+++ b/libs/ardour/audio_unit.cc
@@ -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;
@@ -1069,6 +1077,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;
}