fixed incorrect exception class names

This commit is contained in:
Petr Skoda 2010-09-17 09:59:50 +00:00
parent d7dcdb3572
commit 820f107a10

View File

@ -415,10 +415,10 @@ class report_customlang_menu implements renderable {
*/
public function add_item($key, $title, moodle_url $url, $method) {
if (isset($this->items[$key])) {
throw new coding_error('Menu item already exists');
throw new coding_exception('Menu item already exists');
}
if (empty($title) or empty($key)) {
throw new coding_error('Empty title or item key not allowed');
throw new coding_exception('Empty title or item key not allowed');
}
$item = new stdclass();
$item->title = $title;