Update some modules to throw exceptions instead of BaseObject

This commit is contained in:
Kijin Sung 2018-08-27 00:03:12 +09:00
parent f6fa7493f6
commit 1863edcbb8
12 changed files with 118 additions and 118 deletions

View file

@ -20,7 +20,7 @@ class installAdminController extends install
function procInstallAdminInstall()
{
$module_name = Context::get('module_name');
if(!$module_name) return $this->setError('invalid_request');
if(!$module_name) throw new Rhymix\Framework\Exception('invalid_request');
$oInstallController = getController('install');
$oInstallController->installModule($module_name, './modules/'.$module_name);
@ -35,10 +35,10 @@ class installAdminController extends install
{
@set_time_limit(0);
$module_name = Context::get('module_name');
if(!$module_name) return $this->setError('invalid_request');
if(!$module_name) throw new Rhymix\Framework\Exception('invalid_request');
$oModule = getModule($module_name, 'class');
if(!$oModule) return $this->setError('invalid_request');
if(!$oModule) throw new Rhymix\Framework\Exception('invalid_request');
$output = $oModule->moduleUpdate();
if($output instanceof BaseObject && !$output->toBool())