MDL-48430 customment: improved exception handling

This commit is contained in:
Sam Hemelryk
2014-12-10 13:24:39 +01:00
committed by Eloy Lafuente (stronk7)
parent f6c65c2575
commit 16dfee4e5b
+3 -1
View File
@@ -2863,7 +2863,9 @@ class custom_menu extends custom_menu_item {
case 1:
try {
$itemurl = new moodle_url($setting);
} catch (Exception $e) {
} catch (moodle_exception $exception) {
// We're not actually worried about this, we don't want to mess up the display
// just for a wrongly entered URL.
$itemurl = null;
}
break;