Browse Source

Fix typos in class docs/exception messages

Daniel Rudolf 9 years ago
parent
commit
2a3e2fa576
1 changed files with 11 additions and 5 deletions
  1. 11 5
      lib/Pico.php

+ 11 - 5
lib/Pico.php

@@ -405,7 +405,13 @@ class Pico
                 $this->plugins[$className] = $plugin;
                 $this->plugins[$className] = $plugin;
             } else {
             } else {
                 // TODO: breaks backward compatibility
                 // TODO: breaks backward compatibility
-                //throw new RuntimeException("Unable to load plugin '" . $className . "'");
+                /*
+                $pluginFileName = substr($pluginFile, strlen($this->getPluginsDir()));
+                throw new RuntimeException(
+                    "Unable to load plugin '" . $className . "' "
+                    . "from '" . $pluginFileName . "'"
+                );
+                */
             }
             }
         }
         }
     }
     }
@@ -431,15 +437,15 @@ class Pico
             if (class_exists($className)) {
             if (class_exists($className)) {
                 $plugin = new $className($this);
                 $plugin = new $className($this);
             } else {
             } else {
-                throw new RuntimeException("Unable to load plugin '" . $className . "'");
+                throw new RuntimeException("Unable to load plugin '" . $className . "':  Class not found");
             }
             }
         }
         }
 
 
         $className = get_class($plugin);
         $className = get_class($plugin);
         if (!is_a($plugin, 'PicoPluginInterface')) {
         if (!is_a($plugin, 'PicoPluginInterface')) {
             throw new RuntimeException(
             throw new RuntimeException(
-                "Manually loaded plugins must implement 'PicoPluginInterface', "
-                . "'" . $className . "' given"
+                "Unable to load plugin '" . $className . "': "
+                . "Manually loaded plugins must implement 'PicoPluginInterface'"
             );
             );
         }
         }
 
 
@@ -1382,7 +1388,7 @@ class Pico
      *
      *
      * Deprecated events (as used by plugins not implementing
      * Deprecated events (as used by plugins not implementing
      * {@link PicoPluginInterface}) are triggered by {@link PicoDeprecated}.
      * {@link PicoPluginInterface}) are triggered by {@link PicoDeprecated}.
-     * You MUST NOT trigger events of Pico's core through a plugin!
+     * You MUST NOT trigger events of Pico's core with a plugin!
      *
      *
      * @see    PicoPluginInterface
      * @see    PicoPluginInterface
      * @see    AbstractPicoPlugin
      * @see    AbstractPicoPlugin