Update more modules to throw exceptions

This commit is contained in:
Kijin Sung 2018-09-05 23:12:08 +09:00
parent c1cbc5dbdb
commit be1ce69073
21 changed files with 142 additions and 116 deletions

View file

@ -50,8 +50,14 @@ class pageView extends page
$page_type_name = strtolower($this->module_info->page_type);
$method = '_get' . ucfirst($page_type_name) . 'Content';
if(method_exists($this, $method)) $page_content = $this->{$method}();
else return $this->setError('%s method is not exists', $method);
if(method_exists($this, $method))
{
$page_content = $this->{$method}();
}
else
{
throw new Rhymix\Framework\Exception('%s method is not exists', $method);
}
Context::set('module_info', $this->module_info);
Context::set('page_content', $page_content);