Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
invalid_state_exception Class Reference

An exception that indicates something really weird happened. More...

Inheritance diagram for invalid_state_exception:
moodle_exception Exception

Public Member Functions

 __construct ($hint, $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

An exception that indicates something really weird happened.

For example, if you do switch ($context->contextlevel), and have one case for each CONTEXT_... constant. You might throw an invalid_state_exception in the default case, to just in case something really weird is going on, and $context->contextlevel is invalid - rather than ignoring this possibility.

@subpackage lib

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

Constructor & Destructor Documentation

◆ __construct()

invalid_state_exception::__construct ( $hint,
$debuginfo = null )

Constructor.

Parameters
string$hintshort description of problem
string$debuginfooptional more detailed information

Member Data Documentation

◆ $link

string moodle_exception::$link
inherited

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: