From 5b7ce90a3d47b3c5e271a853458ff3626f575dd5 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 6 Sep 2018 00:19:27 +0900 Subject: [PATCH] Also catch exceptions in init() method of module instances --- classes/module/ModuleObject.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/classes/module/ModuleObject.class.php b/classes/module/ModuleObject.class.php index 05fbeeb86..0ddb2982d 100644 --- a/classes/module/ModuleObject.class.php +++ b/classes/module/ModuleObject.class.php @@ -158,7 +158,14 @@ class ModuleObject extends BaseObject // Execute init if(method_exists($this, 'init')) { - $this->init(); + try + { + $this->init(); + } + catch (Rhymix\Framework\Exception $e) + { + $this->stop($e->getMessage()); + } } }