]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/plugin/exception/PluginFileNotFoundException.php
Merge pull request #1248 from virtualtam/refactor/namespacing
[github/shaarli/Shaarli.git] / application / plugin / exception / PluginFileNotFoundException.php
diff --git a/application/plugin/exception/PluginFileNotFoundException.php b/application/plugin/exception/PluginFileNotFoundException.php
new file mode 100644 (file)
index 0000000..e5386f0
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+namespace Shaarli\Plugin\Exception;
+
+use Exception;
+
+/**
+ * Class PluginFileNotFoundException
+ *
+ * Raise when plugin files can't be found.
+ */
+class PluginFileNotFoundException extends Exception
+{
+    /**
+     * Construct exception with plugin name.
+     * Generate message.
+     *
+     * @param string $pluginName name of the plugin not found
+     */
+    public function __construct($pluginName)
+    {
+        $this->message = sprintf(t('Plugin "%s" files not found.'), $pluginName);
+    }
+}