service cert
This commit is contained in:
parent
04a1ef93da
commit
20b28f7afb
@ -3,6 +3,7 @@
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Log;
|
||||
use Throwable;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
@ -142,7 +143,7 @@ class Handler extends ExceptionHandler
|
||||
if (config('app.debug')) {
|
||||
return $e->getMessage();
|
||||
}
|
||||
|
||||
Log::error($e->getMessage());
|
||||
// 生产环境返回友好消息
|
||||
return match (true) {
|
||||
$e instanceof NotFoundHttpException => '资源不存在',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user