diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index dc31ce5e2c2..fc8347ddc4d 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -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'); } /** diff --git a/lib/form/format.php b/lib/form/format.php index fb67fd99d2d..011b97524ed 100644 --- a/lib/form/format.php +++ b/lib/form/format.php @@ -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 } diff --git a/lib/weblib.php b/lib/weblib.php index b9b20eb0fab..d66c97430fc 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -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; }