From 16dfee4e5b022db27bbb76ff14da08b9177aaefb Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Wed, 10 Dec 2014 09:58:16 +1300 Subject: [PATCH] MDL-48430 customment: improved exception handling --- lib/outputcomponents.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index 661f1f2d1e3..4752d7f9c2d 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -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;