update: error message

This commit is contained in:
tokumeikoi
2022-05-15 01:10:27 +08:00
parent fae48e2c81
commit 649c03c214
4 changed files with 33 additions and 6 deletions

View File

@ -28,8 +28,12 @@ class ThemeController extends Controller
}
$data = var_export($data, 1);
if (!File::put(base_path() . "/config/theme/{$themeName}.php", "<?php\n return $data ;")) {
abort(500, "{$themeName}初始化失败");
try {
if (!File::put(base_path() . "/config/theme/{$themeName}.php", "<?php\n return $data ;")) {
abort(500, "{$themeName}初始化失败");
}
} catch (\Exception $e) {
abort(500, '请检查V2Board目录权限');
}
try {