Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | List of all members
moodle_exception Class Reference

Base Moodle Exception class. More...

Inheritance diagram for moodle_exception:
backup_exception base_atom_exception base_plan_exception base_processor_exception base_step_exception base_task_exception block_not_on_page_exception coding_exception comment_exception convert_exception convert_helper_exception convert_path_exception core\antivirus\scanner_exception core\invalid_persistent_exception core\message\inbound\processing_failed_exception core\session\exception core\update\checker_exception core_analytics\requirements_exception core_calendar\local\event\exceptions\invalid_callback_exception core_calendar\local\event\exceptions\invalid_parameter_exception core_calendar\local\event\exceptions\member_does_not_exist_exception core_search\engine_exception dbtransfer_exception ddl_exception dml_exception enrol_ajax_exception file_exception file_serving_exception invalid_dataroot_permissions invalid_parameter_exception invalid_response_exception invalid_state_exception lang_installer_exception mnet_server_exception moodle_quiz_exception portfolio_exception progressive_parser_exception question_out_of_sequence_exception rating_exception repository_dropbox\dropbox_exception repository_exception repository_nextcloud\configuration_exception repository_nextcloud\request_exception require_login_exception required_capability_exception restore_path_element_exception restricted_context_exception webservice_access_exception webservice_parameter_exception xml_format_exception xml_output_exception xml_writer_exception

Public Member Functions

 __construct ($errorcode, $module='', $link='', $a=NULL, $debuginfo=null)
 Constructor. More...
 

Public Attributes

mixed $a
 Extra words and phrases that might be required in the error string.
 
string $debuginfo
 Optional information to aid the debugging process.
 
string $errorcode
 The name of the string from error.php to print.
 
string $link
 The url where the user will be prompted to continue. More...
 
string $module
 The name of module.
 

Detailed Description

Base Moodle Exception class.

Although this class is defined here, you cannot throw a moodle_exception until after moodlelib.php has been included (which will happen very soon).

@subpackage lib

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

moodle_exception::__construct (   $errorcode,
  $module = '',
  $link = '',
  $a = NULL,
  $debuginfo = null 
)

Constructor.

Parameters
string$errorcodeThe name of the string from error.php to print
string$modulename of module
string$linkThe url where the user will be prompted to continue. If no url is provided the user will be directed to the site index page.
mixed$aExtra words and phrases that might be required in the error string
string$debuginfooptional debugging information

Reimplemented in ddl_dependency_exception, file_reference_exception, moodle_quiz_exception, and portfolio_export_exception.

Member Data Documentation

◆ $link

string moodle_exception::$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.


The documentation for this class was generated from the following file: