refactor: 规范Expection处理

This commit is contained in:
xboard
2023-12-04 20:40:49 +08:00
parent aa0fe64afe
commit 0ab7dee52d
65 changed files with 625 additions and 362 deletions
-18
View File
@@ -2,7 +2,6 @@
namespace App\Services;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\File;
class ThemeService
@@ -33,22 +32,5 @@ class ThemeService
} catch (\Exception $e) {
abort(500, "{$this->theme}初始化失败");
}
// $data = var_export($data, 1);
// try {
// if (!File::put(base_path() . "/config/theme/{$this->theme}.php", "<?php\n return $data ;")) {
// abort(500, "{$this->theme}初始化失败");
// }
// } catch (\Exception $e) {
// abort(500, '请检查V2Board目录权限');
// }
// try {
// Artisan::call('config:cache');
// while (true) {
// if (config("theme.{$this->theme}")) break;
// }
// } catch (\Exception $e) {
// abort(500, "{$this->theme}初始化失败");
// }
}
}