Explorar o código

Improved exception msg if plugin loading failed.

Sascha Zelzer %!s(int64=14) %!d(string=hai) anos
pai
achega
938f441d44
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      Libs/PluginFramework/ctkPluginDatabase.cpp

+ 3 - 1
Libs/PluginFramework/ctkPluginDatabase.cpp

@@ -315,7 +315,9 @@ ctkPluginArchive* ctkPluginDatabase::insertPlugin(const QUrl& location, const QS
   if (!pluginLoader.load())
   {
     rollbackTransaction(&query);
-    throw ctkPluginException(QString("The plugin could not be loaded: %1").arg(localPath));
+    ctkPluginException exc(QString("The plugin could not be loaded: %1").arg(localPath));
+    exc.setCause(pluginLoader.errorString());
+    throw exc;
   }
 
   QDirIterator dirIter(resourcePrefix, QDirIterator::Subdirectories);