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
|
|
@ -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++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue