diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h index c639f25fb1..2b5402df24 100644 --- a/libs/ardour/ardour/processor.h +++ b/libs/ardour/ardour/processor.h @@ -45,6 +45,18 @@ namespace ARDOUR { class Location; class Session; +class LIBARDOUR_API ProcessorException: public std::exception +{ +public: + explicit ProcessorException (const std::string msg) : _message(msg) {} + virtual ~ProcessorException () throw() {} + + virtual const char* what() const throw() { return _message.c_str(); } + +private: + std::string _message; +}; + /** A mixer strip element - plugin, send, meter, etc */ class LIBARDOUR_API Processor : public SessionObject, public Automatable, public Latent { diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 94ec405757..ddc7eab165 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -461,6 +461,9 @@ Session::Session (AudioEngine &eng, case -6: throw SessionException (string_compose (_("Cannot initialize session/engine: %1"), _("Audio/MIDI Engine is not running or sample-rate mismatches."))); break; + case -8: + throw SessionException (string_compose (_("Cannot initialize session/engine: %1"), _("Required Plugin/Processor is missing."))); + break; default: throw SessionException (string_compose (_("Cannot initialize session/engine: %1"), _("Unexpected exception during session setup, possibly invalid audio/midi engine parameters. Please see stdout/stderr for details"))); break; diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index ee2189d725..2692e9d3eb 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -381,6 +381,9 @@ Session::post_engine_init () } catch (AudioEngine::PortRegistrationFailure& err) { error << err.what() << endmsg; return -5; + } catch (ProcessorException const & e) { + error << e.what() << endmsg; + return -8; } catch (std::exception const & e) { error << _("Unexpected exception during session setup: ") << e.what() << endmsg; return -6;