Set default exception message.
authorJan Schneider <jan@horde.org>
Tue, 9 Feb 2010 11:52:07 +0000 (12:52 +0100)
committerJan Schneider <jan@horde.org>
Wed, 10 Feb 2010 16:31:44 +0000 (17:31 +0100)
framework/Exception/lib/Horde/Exception/PermissionDenied.php

index 93b8fce..b27037e 100644 (file)
  */
 class Horde_Exception_PermissionDenied extends Horde_Exception
 {
+    /**
+     * Constructor.
+     *
+     * @see Horde_Exception::__construct()
+     *
+     * @param mixed $message            The exception message, a PEAR_Error
+     *                                  object, or an Exception object.
+     * @param mixed $code_or_lasterror  Either a numeric error code, or
+     *                                  an array from error_get_last().
+     */
+    public function __construct($message = null, $code_or_lasterror = null)
+    {
+        if (is_null($message)) {
+            $message = _("Permission Denied");
+        }
+        parent::__construct($message, $code_or_lasterror);
+    }
 }
\ No newline at end of file