fix:修复报错信息

This commit is contained in:
weifashi 2023-10-17 14:45:19 +08:00
parent eea9d1f3ce
commit 14595d3a60

View File

@ -235,11 +235,10 @@ class AbstractModel extends Model
} catch (\Throwable $eb) { } catch (\Throwable $eb) {
info($eb); info($eb);
} }
info($e);
if ($e instanceof ApiException) { if ($e instanceof ApiException) {
throw new ApiException( config('app.debug') ? $e->getMessage() : '处理错误', $e->getData(), $e->getCode()); throw new ApiException( $e->getMessage() , $e->getData(), $e->getCode());
} else { } else {
throw new ApiException( config('app.debug') ? ($e->getMessage() ?: '处理错误') : '处理错误'); throw new ApiException( $e->getMessage() ?: '处理错误');
} }
} }
} }