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