Skip to content

Commit d3e1aef

Browse files
author
lobtao
committed
根据配置抛出错误
根据配置抛出错误
1 parent de327ad commit d3e1aef

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/BaseRpc.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ protected function exception_handler($exception) {
2626
if ($exception instanceof RpcException) {
2727
$errMsg = $exception->getMessage();
2828
} else {
29-
$errMsg = '系统异常';
29+
if(config('showerror')){
30+
$errMsg = $exception->getMessage();
31+
}else{
32+
$errMsg = '系统异常';
33+
}
3034
}
3135
$data = $this->ajaxReturn([
3236
'retid' => 0,

0 commit comments

Comments
 (0)