MDL-20293 strict param validation support
This commit is contained in:
@@ -121,6 +121,22 @@ class coding_exception extends moodle_exception {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exception indicating malformed parameter problem.
|
||||
* This exception is not supposed to be thrown when processing
|
||||
* user submitted data in forms. It is more suitable
|
||||
* for WS and other low level stuff.
|
||||
*/
|
||||
class invalid_parameter_exception extends moodle_exception {
|
||||
/**
|
||||
* Constructor
|
||||
* @param string $debuginfo some detailed information
|
||||
*/
|
||||
function __construct($debuginfo=null) {
|
||||
parent::__construct('invalidparameter', 'debug', '', null, $debuginfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An exception that indicates something really weird happended. For example,
|
||||
* if you do switch ($context->contextlevel), and have one case for each
|
||||
|
||||
Reference in New Issue
Block a user