From ecdb3d76a27318c08cd00e99a779d99b89ba4c9d Mon Sep 17 00:00:00 2001 From: wlx Date: Tue, 3 Apr 2012 03:27:15 +0000 Subject: [PATCH] add catch block --- application/default/controllers/AuthorController.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/application/default/controllers/AuthorController.php b/application/default/controllers/AuthorController.php index 7d77c45a..00cb3600 100644 --- a/application/default/controllers/AuthorController.php +++ b/application/default/controllers/AuthorController.php @@ -2221,6 +2221,13 @@ class AuthorController extends Zend_Controller_Action $data = array("commited"=>1,"error"=>$this->alertbox('ok','该版本已经成功提交,请等待数据中心进一步处理!')); $this->jsonexit($data); return true; + }catch(Exception $e) { + $msg = "提交失败,请确认权限后重试"; + if($this->debug>0) + {$msg .= $e->getMessage();} + $data = array("error"=>$this->alertbox('error',$msg)); + $this->jsonexit($data); + return true; } } }