changeset 295:0e08ebd5c13b

* More error reporting fixes
author cannam
date Tue, 22 Sep 2009 11:23:23 +0000
parents 3f14a3891817
children 38c638894360
files src/vamp-hostsdk/PluginLoader.cpp
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/vamp-hostsdk/PluginLoader.cpp	Tue Sep 22 10:52:58 2009 +0000
+++ b/src/vamp-hostsdk/PluginLoader.cpp	Tue Sep 22 11:23:23 2009 +0000
@@ -280,12 +280,14 @@
             
             int index = 0;
             const VampPluginDescriptor *descriptor = 0;
+            bool found = false;
             
             while ((descriptor = fn(VAMP_API_VERSION, index))) {
                 ++index;
                 if (identifier != "") {
                     if (descriptor->identifier != identifier) continue;
                 }
+                found = true;
                 PluginKey key = composePluginKey(*fi, descriptor->identifier);
 //                std::cerr << "enumerate: " << key << " (path: " << fullPath << ")" << std::endl;
                 if (m_pluginLibraryNameMap.find(key) ==
@@ -293,6 +295,12 @@
                     m_pluginLibraryNameMap[key] = fullPath;
                 }
             }
+
+            if (!found && forPlugin != "") {
+                cerr << "Vamp::HostExt::PluginLoader: Plugin \""
+                     << identifier << "\" not found in library \""
+                     << fullPath << "\"" << endl;
+            }
             
             unloadLibrary(handle);
         }
@@ -370,9 +378,7 @@
         
     string fullPath = getLibraryPathForPlugin(key);
     if (fullPath == "") {
-        std::cerr << "Vamp::HostExt::PluginLoader: No valid \""
-                  << libname << "." << PLUGIN_SUFFIX
-                  << "\" found in Vamp path" << std::endl;
+        std::cerr << "Vamp::HostExt::PluginLoader: No library found in Vamp path for plugin \"" << key << "\"" << std::endl;
         return 0;
     }