• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP moodle_exception类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中moodle_exception的典型用法代码示例。如果您正苦于以下问题:PHP moodle_exception类的具体用法?PHP moodle_exception怎么用?PHP moodle_exception使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了moodle_exception类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: SAMoodleLibException

 /**
  *
  * @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);
 }
开发者ID:LMSeXT,项目名称:local_samoodlelib,代码行数:36,代码来源:exceptions.php


示例2: __construct

 public function __construct($quizobj, $errorcode, $a = null, $link = '', $debuginfo = null)
 {
     if (!$link) {
         $link = $quizobj->view_url();
     }
     parent::__construct($errorcode, 'quiz', $link, $a, $debuginfo);
 }
开发者ID:elie89,项目名称:moodle,代码行数:7,代码来源:attemptlib.php


示例3: __construct

 /**
  * 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);
 }
开发者ID:Burick,项目名称:moodle,代码行数:12,代码来源:blocklib.php


示例4:

 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);
 }
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:8,代码来源:dtllib.php


示例5: __construct

 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));
 }
开发者ID:evltuma,项目名称:moodle,代码行数:8,代码来源:invalid_persistent_exception.php


示例6: stdClass

 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);
 }
开发者ID:evltuma,项目名称:moodle,代码行数:11,代码来源:xmlize.php


示例7: stdClass

 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);
 }
开发者ID:tyleung,项目名称:CMPUT401MoodleExams,代码行数:9,代码来源:upgradelib.php


示例8:

 /**
  * Constructor
  *
  * @param string $debuginfo the debug info
  */
 function __construct($debuginfo)
 {
     parent::__construct('accessexception', 'webservice', '', null, $debuginfo);
 }
开发者ID:rushi963,项目名称:moodle,代码行数:9,代码来源:lib.php


示例9: __construct

 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));
 }
开发者ID:mongo0se,项目名称:moodle,代码行数:7,代码来源:lib.php


示例10:

 /**
  * 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);
 }
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:9,代码来源:setuplib.php


示例11: __construct

 public function __construct($errorcode, $a = NULL, $debuginfo = null)
 {
     parent::__construct($errorcode, 'error', '', $a, $debuginfo);
 }
开发者ID:eamador,项目名称:moodle-course-custom-fields,代码行数:4,代码来源:backup.class.php


示例12: __construct

 /**
  * @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));
 }
开发者ID:masaterutakeno,项目名称:MoodleMobile,代码行数:8,代码来源:pluginlib.php


示例13: __construct

 /**
  * 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);
 }
开发者ID:jtibbetts,项目名称:moodle,代码行数:27,代码来源:upgradelib.php


示例14:

 /**
  * 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);
 }
开发者ID:numbas,项目名称:moodle,代码行数:11,代码来源:file_exceptions.php


示例15: __construct

 /**
  * 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);
 }
开发者ID:evltuma,项目名称:moodle,代码行数:12,代码来源:scanner_exception.php


示例16:

 /**
  * Constructor
  *
  * @param string $debuginfo some detailed information
  */
 function __construct($debuginfo=null) {
     parent::__construct('invalidreturnvalue', 'webservice_amf', '', $debuginfo, $debuginfo);
 }
开发者ID:JP-Git,项目名称:moodle,代码行数:8,代码来源:locallib.php


示例17: __construct

 public function __construct($subcourseid, $debuginfo = null)
 {
     $a = new object();
     $a->subcourseid = $subcourseid;
     parent::__construct('errlocalremotescale', 'subcourse', '', $a, $debuginfo);
 }
开发者ID:nadavkav,项目名称:moodle-mod_subcourse,代码行数:6,代码来源:exceptions.php


示例18:

 /**
  * 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);
 }
开发者ID:nadavkav,项目名称:Moodle2-Hebrew-plugins,代码行数:8,代码来源:mod_forumng_file_exception.php


示例19: __construct

 /**
  * 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);
 }
开发者ID:collegemathieu,项目名称:moodle-mod_webexactivity,代码行数:13,代码来源:webexactivity_exception.php


示例20:

 function __construct($errorcode, $a = NULL, $debuginfo = NULL)
 {
     parent::__construct($errorcode, 'local_onlinejudge', '', $a, $debuginfo);
 }
开发者ID:boychunli,项目名称:moodle-local_onlinejudge,代码行数:4,代码来源:exceptions.php



注:本文中的moodle_exception类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP moodle_page类代码示例发布时间:2022-05-23
下一篇:
PHP moodle_database类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap