From 1c5293f38f0a44ee0d57db4dd9d09d3d887eb4ee Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Thu, 18 Jul 2013 20:43:46 +0100 Subject: [PATCH] fixed bug discovered during Qt5 migration: you can't throw nothing (unless you're rethrowing an already caught exception) --- src/blackcore/pluginmgr.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/blackcore/pluginmgr.cpp b/src/blackcore/pluginmgr.cpp index ee86d592a..928a4a216 100644 --- a/src/blackcore/pluginmgr.cpp +++ b/src/blackcore/pluginmgr.cpp @@ -8,6 +8,7 @@ #include "blackmisc/context.h" #include #include +#include namespace BlackCore { @@ -41,7 +42,7 @@ namespace BlackCore { if (! loader->load()) { - throw; + throw std::runtime_error(QString("Failed loading plugin from %1").arg(filename).toStdString()); } PluginEntry entry; @@ -50,14 +51,14 @@ namespace BlackCore if (! entry.factory) { - throw; + throw std::runtime_error(QString("Plugin loaded from %1 is not compatible").arg(filename).toStdString()); } m_plugins.push_back(entry); } catch (...) { - //TODO warning + //TODO warning? } } }