mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +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
|
|
@ -32,11 +32,11 @@ class fileAdminController extends file
|
|||
{
|
||||
// An error appears if no document is selected
|
||||
$cart = Context::get('cart');
|
||||
if(!$cart) return $this->stop('msg_file_cart_is_null');
|
||||
if(!$cart) throw new Rhymix\Framework\Exception('msg_file_cart_is_null');
|
||||
if(!is_array($cart)) $file_srl_list= explode('|@|', $cart);
|
||||
else $file_srl_list = $cart;
|
||||
$file_count = count($file_srl_list);
|
||||
if(!$file_count) return $this->stop('msg_file_cart_is_null');
|
||||
if(!$file_count) throw new Rhymix\Framework\Exception('msg_file_cart_is_null');
|
||||
|
||||
$oFileController = getController('file');
|
||||
// Delete the post
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue