mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-02 16:52:16 +09:00
Update more modules to throw exceptions
This commit is contained in:
parent
c1cbc5dbdb
commit
be1ce69073
21 changed files with 142 additions and 116 deletions
|
|
@ -131,7 +131,7 @@ class pageAdminController extends page
|
|||
{
|
||||
$module_srl = Context::get('module_srl');
|
||||
$content = Context::get('content');
|
||||
if(!$module_srl) return $this->setError('msg_invalid_request');
|
||||
if(!$module_srl) throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
$mcontent = Context::get('mcontent');
|
||||
$type = Context::get('type');
|
||||
// Guhaeom won information page
|
||||
|
|
@ -301,7 +301,7 @@ class pageAdminController extends page
|
|||
|
||||
if(!$grant->manager)
|
||||
{
|
||||
return $this->setError('msg_not_permitted');
|
||||
throw new Rhymix\Framework\Exceptions\NotPermitted;
|
||||
}
|
||||
|
||||
$obj = Context::getRequestVars();
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ class pageAdminView extends page
|
|||
}
|
||||
else
|
||||
{
|
||||
return $this->setError(sprintf('%s method is not exists', $method));
|
||||
throw new Rhymix\Framework\Exception(sprintf('%s method is not exists', $method));
|
||||
}
|
||||
|
||||
Context::set('module_info', $this->module_info);
|
||||
|
|
|
|||
|
|
@ -33,8 +33,14 @@ class pageMobile extends pageView
|
|||
|
||||
$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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue