Also catch exceptions in init() method of module instances

This commit is contained in:
Kijin Sung 2018-09-06 00:19:27 +09:00
parent ad00ac800b
commit 5b7ce90a3d

View file

@ -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());
}
}
}