mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
fixed incorrect exception name
This commit is contained in:
parent
db1218a970
commit
cdefaa86f6
@ -93,7 +93,7 @@ function get_file_url($path, $options=null, $type='coursefile') {
|
||||
* @deprecated removed - use new file api
|
||||
*/
|
||||
function print_file_upload_error($filearray = '', $returnerror = false) {
|
||||
throw new coding_error('print_file_upload_error() can not be used any more, please use new file API');
|
||||
throw new coding_exception('print_file_upload_error() can not be used any more, please use new file API');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -102,7 +102,7 @@ function print_file_upload_error($filearray = '', $returnerror = false) {
|
||||
*/
|
||||
|
||||
function resolve_filename_collisions($destination,$files,$format='%s_%d.%s') {
|
||||
throw new coding_error('resolve_filename_collisions() can not be used any more, please use new file API');
|
||||
throw new coding_exception('resolve_filename_collisions() can not be used any more, please use new file API');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -110,7 +110,7 @@ function resolve_filename_collisions($destination,$files,$format='%s_%d.%s') {
|
||||
* @deprecated removed - use new file api
|
||||
*/
|
||||
function check_potential_filename($destination,$filename,$files) {
|
||||
throw new coding_error('check_potential_filename() can not be used any more, please use new file API');
|
||||
throw new coding_exception('check_potential_filename() can not be used any more, please use new file API');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -118,7 +118,7 @@ function check_potential_filename($destination,$filename,$files) {
|
||||
* @deprecated removed - use new file api
|
||||
*/
|
||||
function upload_print_form_fragment($numfiles=1, $names=null, $descriptions=null, $uselabels=false, $labelnames=null, $coursebytes=0, $modbytes=0, $return=false) {
|
||||
throw new coding_error('upload_print_form_fragment() can not be used any more, please use new file API');
|
||||
throw new coding_exception('upload_print_form_fragment() can not be used any more, please use new file API');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ class MoodleQuickForm_format extends MoodleQuickForm_select{
|
||||
*/
|
||||
function MoodleQuickForm_format($elementName=null, $elementLabel=null, $attributes=null, $useHtmlEditor=null)
|
||||
{
|
||||
throw new coding_error('MFORMS: Coding error, text formats are handled only by new editor element.');
|
||||
throw new coding_exception('MFORMS: Coding error, text formats are handled only by new editor element.');
|
||||
} //end constructor
|
||||
|
||||
}
|
||||
|
@ -461,13 +461,13 @@ class moodle_url {
|
||||
$params = $this->params;
|
||||
foreach ($overrideparams as $key=>$value) {
|
||||
if (is_int($key)) {
|
||||
throw new coding_error('Overriden parameters can not have numeric keys!');
|
||||
throw new coding_exception('Overridden parameters can not have numeric keys!');
|
||||
}
|
||||
if (is_array($value)) {
|
||||
throw new coding_error('Overriden parameters values can not be arrays!');
|
||||
throw new coding_exception('Overridden parameters values can not be arrays!');
|
||||
}
|
||||
if (is_object($value) and !method_exists($value, '__toString')) {
|
||||
throw new coding_error('Overriden parameters values can not be objects, unless __toString() is defined!');
|
||||
throw new coding_exception('Overridden parameters values can not be objects, unless __toString() is defined!');
|
||||
}
|
||||
$params[$key] = (string)$value;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user