Commit 7600f079 by 王召彬

test

parent d96a23a2
......@@ -14,20 +14,17 @@ class BaseException extends Exception
// 业务错误码
public $errorCode = -1;
public function __construct($params)
public function __construct($params = [])
{
if(!is_array($params)){
return;
}
if(array_key_exists('code',$params)){
if(isset($params['code'])){
$this->code = $params['code'];
}
if(array_key_exists('msg',$params)){
if(isset($params['msg'])){
$this->message = $params['msg'];
}
if(array_key_exists('error_code',$params)){
if(isset($params['error_code'])){
$this->errorCode = $params['error_code'];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment