mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Replace $this->stop() with proper exceptions
This commit is contained in:
parent
5b7ce90a3d
commit
d8a0773b97
26 changed files with 109 additions and 69 deletions
|
|
@ -267,8 +267,7 @@ class moduleModel extends module
|
|||
|
||||
if(!$menuItemSrl)
|
||||
{
|
||||
$this->stop(-1, 'msg_invalid_request');
|
||||
return;
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
|
||||
$args = new stdClass();
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ class moduleView extends module
|
|||
$skin = Context::get('skin');
|
||||
// Get modules/skin information
|
||||
$module_path = sprintf("./modules/%s/", $selected_module);
|
||||
if(!is_dir($module_path)) $this->stop("msg_invalid_request");
|
||||
if(!is_dir($module_path)) throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
|
||||
$skin_info_xml = sprintf("%sskins/%s/skin.xml", $module_path, $skin);
|
||||
if(!file_exists($skin_info_xml)) $this->stop("msg_invalid_request");
|
||||
if(!file_exists($skin_info_xml)) throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$skin_info = $oModuleModel->loadSkinInfo($module_path, $skin);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue