aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/ExtensionException.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-12-04 19:33:29 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-12-04 19:33:29 +0100
commit86f69ca396572ca4d7668a33e84cb4f3b523fc4e (patch)
tree968d2cebe522ca17c6210583635d9ea7177460e8 /lib/Minz/ExtensionException.php
parent53410887c94157f3d11f2c30d92ff5d3d8a3a9bd (diff)
First draft for the new extension feature
- Only system extensions can be loaded for the moment by adding them in the config.php file. - Remove previous system (it will be added properly in the new system in the next step).
Diffstat (limited to 'lib/Minz/ExtensionException.php')
-rw-r--r--lib/Minz/ExtensionException.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Minz/ExtensionException.php b/lib/Minz/ExtensionException.php
new file mode 100644
index 000000000..647f1a9b9
--- /dev/null
+++ b/lib/Minz/ExtensionException.php
@@ -0,0 +1,15 @@
+<?php
+
+class Minz_ExtensionException extends Minz_Exception {
+ public function __construct ($message, $extension_name = false, $code = self::ERROR) {
+ if ($extension_name) {
+ $message = 'An error occured in `' . $extension_name
+ . '` extension with the message: ' . $message;
+ } else {
+ $message = 'An error occured in an unnamed '
+ . 'extension with the message: ' . $message;
+ }
+
+ parent::__construct($message, $code);
+ }
+}