Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401]

   1  <?php
   2  /**
   3   * Copyright 2010-2017 Horde LLC (http://www.horde.org/)
   4   *
   5   * See the enclosed file LICENSE for license information (LGPL). If you
   6   * did not receive this file, see http://www.horde.org/licenses/lgpl21.
   7   *
   8   * @author   
   9   * @category Horde
  10   * @license  http://www.horde.org/licenses/lgpl21 LGPL
  11   * @package  Exception
  12   */
  13  
  14  /**
  15   * Exception thrown if any access without sufficient permissions occured.
  16   *
  17   * @author    
  18   * @category  Horde
  19   * @copyright 2010-2017 Horde LLC
  20   * @license   http://www.horde.org/licenses/lgpl21 LGPL
  21   * @package   Exception
  22   */
  23  class Horde_Exception_PermissionDenied extends Horde_Exception
  24  {
  25      /**
  26       * Constructor.
  27       *
  28       * @see Horde_Exception::__construct()
  29       *
  30       * @param string|Exception $message           The exception message, a PEAR_Error
  31       *                                 object, or an Exception object.
  32       * @param integer $code            A numeric error code.
  33       */
  34      public function __construct($message = null, $code = null)
  35      {
  36          if (is_null($message)) {
  37              $message = Horde_Exception_Translation::t("Permission Denied");
  38          }
  39          parent::__construct($message, $code);
  40      }
  41  }