Replace $this->stop() with proper exceptions

This commit is contained in:
Kijin Sung 2018-09-06 00:19:47 +09:00
parent 5b7ce90a3d
commit d8a0773b97
26 changed files with 109 additions and 69 deletions

View file

@ -44,7 +44,7 @@ class pollAdminController extends poll
else $poll_srl_list= explode('|@|', $cart);
$poll_count = count($poll_srl_list);
if(!$poll_count) return $this->stop('msg_cart_is_null');
if(!$poll_count) throw new Rhymix\Framework\Exception('msg_cart_is_null');
// Delete the post
for($i=0;$i<$poll_count;$i++)
{

View file

@ -139,7 +139,7 @@ class pollAdminView extends poll
$args->poll_index_srl = Context::get('poll_index_srl');
$output = executeQuery('poll.getPoll', $args);
if(!$output->data) return $this->stop('msg_poll_not_exists');
if(!$output->data) throw new Rhymix\Framework\Exception('msg_poll_not_exists');
$poll = new stdClass();
$poll->stop_date = $output->data->stop_date;
@ -148,7 +148,7 @@ class pollAdminView extends poll
$output = executeQuery('poll.getPollTitle', $args);
if(!$output->data)
{
return $this->stop('msg_poll_not_exists');
throw new Rhymix\Framework\Exception('msg_poll_not_exists');
}
$tmp = &$poll->poll[$args->poll_index_srl];