update: exception message

This commit is contained in:
v2board 2023-04-14 17:40:39 +08:00
parent de478db2c7
commit bc5fb4956c
2 changed files with 6 additions and 3 deletions

View File

@ -54,9 +54,7 @@ class Handler extends ExceptionHandler
public function render($request, Throwable $exception)
{
if ($exception instanceof ViewException) {
return response([
'message' => "主题初始化发生错误,请在后台对主题检查或配置后重试。"
]);
abort(500, "主题渲染失败。如更新主题参数参数发生变化请重新配置主题后再试。");
}
return parent::render($request, $exception);
}

View File

@ -0,0 +1,5 @@
@extends('errors::minimal')
@section('title', __('Server Error'))
@section('code', '500')
@section('message', __($exception->getMessage() ?: 'Server Error'))