From e70a7bb7fbed5533690fa0fcea1e157867b2b1fa Mon Sep 17 00:00:00 2001 From: "Stephen D. Huston" Date: Wed, 28 Oct 2009 23:47:03 +0000 Subject: Change StorageProvider::Exception to inherit from qpid::Exception instead of std::exception; allows the broker to catch them and do something other than die without a message. Fixed exception handling around more ADO ops and correctly handle com exceptions without associated ErrorInfo. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@830797 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/store/MessageStorePlugin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/store/MessageStorePlugin.cpp') diff --git a/cpp/src/qpid/store/MessageStorePlugin.cpp b/cpp/src/qpid/store/MessageStorePlugin.cpp index 6b6e1f0cde..6720fd13f3 100644 --- a/cpp/src/qpid/store/MessageStorePlugin.cpp +++ b/cpp/src/qpid/store/MessageStorePlugin.cpp @@ -73,6 +73,7 @@ MessageStorePlugin::earlyInitialize (qpid::Plugin::Target& target) if (providers.empty()) { QPID_LOG(warning, "Message store plugin: No storage providers available."); + provider = providers.end(); return; } if (!options.providerName.empty()) { @@ -86,10 +87,12 @@ MessageStorePlugin::earlyInitialize (qpid::Plugin::Target& target) else { // No specific provider chosen; if there's only one, use it. Else // report the need to pick one. - if (providers.size() > 1) + if (providers.size() > 1) { + provider = providers.end(); throw Exception("Message store plugin: multiple provider plugins " "loaded; must either load only one or select one " "using --storage-provider"); + } provider = providers.begin(); } -- cgit v1.2.1