diff Test.cpp @ 23:28097c1b3de4

* Add verbose option * More sensible response when a plugin legitimately refuses to initialise * Actually throw an exception when failing to load a plugin, instead of just saying that we do so in the comment but actually crashing instead
author cannam
date Mon, 08 Jun 2009 10:08:26 +0000
parents 5af5eb2627ad
children b1bc4d045a4b
line wrap: on
line diff
--- a/Test.cpp	Fri Mar 20 15:57:38 2009 +0000
+++ b/Test.cpp	Mon Jun 08 10:08:26 2009 +0000
@@ -52,8 +52,10 @@
 Plugin *
 Test::load(std::string key, float rate)
 {
-    return PluginLoader::getInstance()->loadPlugin
+    Plugin *p = PluginLoader::getInstance()->loadPlugin
         (key, rate, PluginLoader::ADAPT_ALL);
+    if (!p) throw FailedToLoadPlugin();
+    return p;
 }
 
 float **