Example #1
0
 /**
  *
  * @param mix $errorcode
  * @param object $a
  * @param string $debuginfo
  */
 public function SAMoodleLibException($errorcode, $a = NULL, $debuginfo = NULL)
 {
     if (is_a($errorcode, 'moodle_exception')) {
         //hack eclipse
         if (false) {
             $errorcode = new moodle_exception('');
         } else {
             $e = $errorcode;
             $errorcode = $e->errorcode;
             $a = $e->a;
             $debuginfo = $e->debuginfo;
         }
     } else {
         if (is_a($errorcode, 'Exception')) {
             //hack eclipse
             if (false) {
                 $errorcode = new moodle_exception('');
             } else {
                 $e = $errorcode;
                 $errorcode = $e->getMessage() . ', Código do Erro: ' . $e->getCode();
                 $debuginfo = $e->getCode();
             }
         }
     }
     /*$originalerrordocroot = $CFG->errordocroot;
     		 $CFG->errordocroot = '';
     		$CFG->errordocroot = $originaldocroot;
     		*/
     parent::__construct($errorcode, 'local_samoodlelib', '', $a, $debuginfo);
 }
Example #2
0
 public function __construct($quizobj, $errorcode, $a = null, $link = '', $debuginfo = null)
 {
     if (!$link) {
         $link = $quizobj->view_url();
     }
     parent::__construct($errorcode, 'quiz', $link, $a, $debuginfo);
 }
Example #3
0
 /**
  * Constructor
  * @param int $instanceid the block instance id of the block that was looked for.
  * @param object $page the current page.
  */
 public function __construct($instanceid, $page)
 {
     $a = new stdClass();
     $a->instanceid = $instanceid;
     $a->url = $page->url->out();
     parent::__construct('blockdoesnotexistonpage', '', $page->url->out(), $a);
 }
Example #4
0
 function __construct($errorcode, $a = null, $link = '', $debuginfo = null)
 {
     global $CFG;
     if (empty($link)) {
         $link = "{$CFG->wwwroot}/{$CFG->admin}/";
     }
     parent::__construct($errorcode, 'dbtransfer', $link, $a, $debuginfo);
 }
 public function __construct(array $errors = array())
 {
     $debuginfo = array();
     foreach ($errors as $key => $message) {
         $debuginfo[] = "{$key}: {$message}";
     }
     parent::__construct('invalidpersistent', 'core_competency', null, null, implode(' - ', $debuginfo));
 }
Example #6
0
 function __construct($errorstring, $line, $char, $link = '')
 {
     $this->errorstring = $errorstring;
     $this->line = $line;
     $this->char = $char;
     $a = new stdClass();
     $a->errorstring = $errorstring;
     $a->errorline = $line;
     $a->errorchar = $char;
     parent::__construct('errorparsingxml', 'error', $link, $a);
 }
 function __construct($component, $expected, $current)
 {
     global $CFG;
     $a = new stdClass();
     $a->component = $component;
     $a->expected = $expected;
     $a->current = $current;
     parent::__construct('detectedmisplacedplugin', 'core_plugin', "{$CFG->wwwroot}/{$CFG->admin}/index.php", $a);
 }
Example #8
0
 /**
  * Constructor
  *
  * @param string $debuginfo the debug info
  */
 function __construct($debuginfo)
 {
     parent::__construct('accessexception', 'webservice', '', null, $debuginfo);
 }
Example #9
0
 public function __construct($qubaid, $slot, $postdata)
 {
     if ($postdata == null) {
         $postdata = data_submitted();
     }
     parent::__construct('submissionoutofsequence', 'question', '', null, "QUBAid: {$qubaid}, slot: {$slot}, post data: " . print_r($postdata, true));
 }
Example #10
0
 /**
  * Constructor
  * @param string $hint short description of problem
  * @param string $debuginfo optional more detailed information
  */
 function __construct($hint, $debuginfo = null)
 {
     parent::__construct('invalidstatedetected', 'debug', '', $hint, $debuginfo);
 }
 public function __construct($errorcode, $a = NULL, $debuginfo = null)
 {
     parent::__construct($errorcode, 'error', '', $a, $debuginfo);
 }
Example #12
0
 /**
  * @param string $errorcode exception description identifier
  * @param mixed $debuginfo debugging data to display
  */
 public function __construct($errorcode, $debuginfo = null)
 {
     parent::__construct($errorcode, 'core_plugin', '', null, print_r($debuginfo, true));
 }
Example #13
0
 /**
  * Constructor.
  * @param string $component the component from version.php
  * @param string $expected expected directory, null means calculate
  * @param string $current plugin directory path
  */
 public function __construct($component, $expected, $current) {
     global $CFG;
     if (empty($expected)) {
         list($type, $plugin) = core_component::normalize_component($component);
         $plugintypes = core_component::get_plugin_types();
         if (isset($plugintypes[$type])) {
             $expected = $plugintypes[$type] . '/' . $plugin;
         }
     }
     if (strpos($expected, '$CFG->dirroot') !== 0) {
         $expected = str_replace($CFG->dirroot, '$CFG->dirroot', $expected);
     }
     if (strpos($current, '$CFG->dirroot') !== 0) {
         $current = str_replace($CFG->dirroot, '$CFG->dirroot', $current);
     }
     $a = new stdClass();
     $a->component = $component;
     $a->expected  = $expected;
     $a->current   = $current;
     parent::__construct('detectedmisplacedplugin', 'core_plugin', "$CFG->wwwroot/$CFG->admin/index.php", $a);
 }
Example #14
0
 /**
  * Constructor
  *
  * @param string $errorcode error code
  * @param stdClass $a Extra words and phrases that might be required in the error string
  * @param string $debuginfo optional debugging information
  */
 function __construct($errorcode, $a = NULL, $debuginfo = NULL)
 {
     parent::__construct($errorcode, '', '', $a, $debuginfo);
 }
Example #15
0
 /**
  * Constructs a new exception
  *
  * @param string $errorcode
  * @param string $link
  * @param mixed $a
  * @param mixed $debuginfo
  */
 public function __construct($errorcode, $link = '', $a = null, $debuginfo = null)
 {
     parent::__construct($errorcode, 'antivirus', $link, $a, $debuginfo);
 }
Example #16
0
 /**
  * Constructor
  *
  * @param string $debuginfo some detailed information
  */
 function __construct($debuginfo=null) {
     parent::__construct('invalidreturnvalue', 'webservice_amf', '', $debuginfo, $debuginfo);
 }
 public function __construct($subcourseid, $debuginfo = null)
 {
     $a = new object();
     $a->subcourseid = $subcourseid;
     parent::__construct('errlocalremotescale', 'subcourse', '', $a, $debuginfo);
 }
 /**
  * Constructor.
  * @param string $error Actual error message (not displayed to user unless debug is turned on)
  */
 function __construct($error)
 {
     parent::__construct('error_fileexception', 'forumng', '', '', $error);
 }
 /**
  * Constructor
  *
  * @param string $errorcode The name of the string to print.
  * @param string $link The url where the user will be prompted to continue.
  *                  If no url is provided the user will be directed to the site index page.
  * @param mixed $a Extra words and phrases that might be required in the error string.
  * @param string $debuginfo optional debugging information.
  */
 public function __construct($errorcode, $link = '', $a = null, $debuginfo = null)
 {
     parent::__construct($errorcode, 'mod_webexactivity', $link, $a, $debuginfo);
 }
 function __construct($errorcode, $a = NULL, $debuginfo = NULL)
 {
     parent::__construct($errorcode, 'local_onlinejudge', '', $a, $debuginfo);
 }
Example #21
0
    /**
     * @param int    $intcode      the numerical error associated with this fault.  this is <b>not</b> the string errorcode
     * @param string $langkey      the error message in full (<b>get_string will not be used</b>)
     * @param string $module       the language module, defaults to 'mnet'
     * @param mixed  $a            params for get_string
     */
    public function __construct($intcode, $languagekey, $module='mnet', $a=null) {
        parent::__construct($languagekey, $module, '', $a);
        $this->code    = $intcode;

    }
Example #22
0
 /**
  * Constructor
  *
  * @since Moodle 2.0
  */
 function __construct()
 {
     parent::__construct('restrictedcontextexception', 'error');
 }
Example #23
0
 /**
  * Constructor
  * @param string $errorcode The name of the string from error.php to print
  * @param string $module name of module
  * @param string $link The url where the user will be prompted to continue. If no url is provided the user will be directed to the site index page.
  * @param object $a Extra words and phrases that might be required in the error string
  * @param string $debuginfo optional debugging information
  */
 public function __construct($errorcode, $link = '', $a = NULL, $debuginfo = null)
 {
     parent::__construct($errorcode, 'enrol', $link, $a, $debuginfo);
 }
Example #24
0
 public function __construct($error)
 {
     parent::__construct('exceptionmessage', 'qtype_stack', '', $error);
 }
 /**
  * Constructor
  * @param string $debuginfo optional more detailed information
  */
 function __construct($debuginfo = NULL)
 {
     parent::__construct('cannotrecovergrades', 'error', '', NULL, $debuginfo);
 }
Example #26
0
 /**
  * Constructs a new exception
  *
  * @param string $errorcode
  * @param string $module
  * @param string $link
  * @param mixed $a
  * @param mixed $debuginfo
  */
 public function __construct($errorcode, $module = 'cache', $link = '', $a = null, $debuginfo = null)
 {
     // This may appear like a useless override but you will notice that we have set a MUCH more useful default for $module.
     parent::__construct($errorcode, $module, $link, $a, $debuginfo);
 }
Example #27
0
 function __construct($plugin, $details) {
     global $CFG;
     parent::__construct('detectedbrokenplugin', 'error', "$CFG->wwwroot/$CFG->admin/index.php", $plugin, $details);
 }
 /**
  * Create a new instance of the exception
  *
  * @param string $errorcode
  * @param string $link
  * @param \stdClass|null $a
  * @param string $debuginfo
  */
 public function __construct($errorcode, $link = '', $a = null, $debuginfo = null)
 {
     parent::__construct($errorcode, 'block_coupon', $link, $a, $debuginfo);
 }
Example #29
0
 /**
  * Constructor
  * @param string $debuginfo optional more detailed information
  */
 function __construct($debuginfo = NULL)
 {
     parent::__construct('cannotservefile', 'error', '', NULL, $debuginfo);
 }
 /**
  * @param string $errorcode exception description identifier
  * @param mixed $debuginfo debugging data to display
  */
 public function __construct($errorcode, $a = null, $debuginfo = null)
 {
     parent::__construct($errorcode, 'tool_installaddon', '', $a, print_r($debuginfo, true));
 }