mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 05:50:50 +00:00
抛错信息整理
This commit is contained in:
parent
89587edd55
commit
618f56d1fc
@ -84,7 +84,7 @@ class AdminApiExceptionHandle extends Handle
|
||||
'trace' => $e->getTrace(),
|
||||
'previous' => $e->getPrevious(),
|
||||
] : [];
|
||||
$message = Env::get('app_debug', false) ? $e->getMessage() : '很抱歉,系统开小差了';
|
||||
$message = $e->getMessage();
|
||||
// 添加自定义异常处理机制
|
||||
if ($e instanceof AuthException || $e instanceof AdminException || $e instanceof ApiException || $e instanceof ValidateException) {
|
||||
return app('json')->make($e->getCode() ?: 400, $message, $massageData);
|
||||
|
||||
@ -85,7 +85,7 @@ class ApiExceptionHandle extends Handle
|
||||
'trace' => $e->getTrace(),
|
||||
'previous' => $e->getPrevious(),
|
||||
] : [];
|
||||
$message = Env::get('app_debug', false) ? $e->getMessage() : '很抱歉,系统开小差了';
|
||||
$message = $e->getMessage();
|
||||
// 添加自定义异常处理机制
|
||||
if ($e instanceof ApiStatusException) {
|
||||
return app('json')->status($e->getApiStatus(), $message, $e->getApiData());
|
||||
|
||||
@ -84,7 +84,7 @@ class KefuApiExceptionHandle extends Handle
|
||||
'trace' => $e->getTrace(),
|
||||
'previous' => $e->getPrevious(),
|
||||
] : [];
|
||||
$message = Env::get('app_debug', false) ? $e->getMessage() : '很抱歉,系统开小差了';
|
||||
$message = $e->getMessage();
|
||||
// 添加自定义异常处理机制
|
||||
if ($e instanceof AuthException || $e instanceof AdminException || $e instanceof ApiException || $e instanceof ValidateException) {
|
||||
return app('json')->make($e->getCode() ?: 400, $message, $massageData);
|
||||
|
||||
@ -84,7 +84,7 @@ class OutApiExceptionHandle extends Handle
|
||||
'trace' => $e->getTrace(),
|
||||
'previous' => $e->getPrevious(),
|
||||
] : [];
|
||||
$message = Env::get('app_debug', false) ? $e->getMessage() : '很抱歉,系统开小差了';
|
||||
$message = $e->getMessage();
|
||||
// 添加自定义异常处理机制
|
||||
if ($e instanceof AuthException || $e instanceof AdminException || $e instanceof ApiException || $e instanceof ValidateException) {
|
||||
return app('json')->make($e->getCode() ?: 400, $message, $massageData);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user