Commit 9e1e92aa by zhufx
parents 8c41e667 740d3422
......@@ -31,7 +31,7 @@ class BaseController
*/
public static function error(int $errorCode, string $msg, $data=null) {
return [
'error_code' => $errorCode,
'errorCode' => $errorCode,
'msg' => $msg,
'data' => $data,
];
......@@ -48,7 +48,7 @@ class BaseController
return [
'data' => $data,
'msg' => $msg,
'error_code' => 0,
'errorCode' => 0,
];
}
}
\ No newline at end of file
......@@ -24,8 +24,8 @@ class BaseException extends Exception
$this->message = $params['msg'];
}
if(isset($params['error_code'])){
$this->errorCode = $params['error_code'];
if(isset($params['errorCode'])){
$this->errorCode = $params['errorCode'];
}
parent::__construct($this->message, $this->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