Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
moodle_exception Class Reference

Base Moodle Exception class. More...

Inheritance diagram for moodle_exception:
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_external\restricted_context_exception core_reportbuilder\report_access_exception core_reportbuilder\source_invalid_exception core_reportbuilder\source_unavailable_exception core_search\engine_exception core_xapi\xapi_exception dbtransfer_exception ddl_exception dml_exception downgrade_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 mod_bigbluebuttonbn\local\exceptions\bigbluebutton_exception mod_bigbluebuttonbn\local\exceptions\meeting_join_exception mod_bigbluebuttonbn\local\exceptions\server_not_available_exception moodle_quiz_exception plugin_defective_exception plugin_incompatible_exception plugin_misplaced_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 upgrade_exception upgrade_requires_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.
 

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.
 
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 core\antivirus\scanner_exception, ddl_dependency_exception, file_reference_exception, mod_bigbluebuttonbn\local\exceptions\server_not_available_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: