# HG changeset patch # User cannam # Date 1253618603 0 # Node ID 0e08ebd5c13ba8f22f6570d4fe0a12a2d51ab84a # Parent 3f14a3891817eab6db06e9634e420d24845a330c * More error reporting fixes diff -r 3f14a3891817 -r 0e08ebd5c13b src/vamp-hostsdk/PluginLoader.cpp --- 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; }