|
@@ -16,7 +16,6 @@
|
|
|
|
|
|
namespace app\admin\controller\api;
|
|
|
|
|
|
-use Exception;
|
|
|
use think\admin\Controller;
|
|
|
use think\admin\model\SystemConfig;
|
|
|
use think\admin\service\AdminService;
|
|
@@ -44,7 +43,7 @@ class Runtime extends Controller
|
|
|
$this->success('网站缓存加速成功!', 'javascript:location.reload()');
|
|
|
} catch (HttpResponseException $exception) {
|
|
|
throw $exception;
|
|
|
- } catch (Exception $exception) {
|
|
|
+ } catch (\Exception $exception) {
|
|
|
$this->error($exception->getMessage());
|
|
|
} else {
|
|
|
$this->error('只有超级管理员才能操作!');
|
|
@@ -64,7 +63,7 @@ class Runtime extends Controller
|
|
|
$this->success('清空缓存日志成功!', 'javascript:location.reload()');
|
|
|
} catch (HttpResponseException $exception) {
|
|
|
throw $exception;
|
|
|
- } catch (Exception $exception) {
|
|
|
+ } catch (\Exception $exception) {
|
|
|
$this->error($exception->getMessage());
|
|
|
} else {
|
|
|
$this->error('只有超级管理员才能操作!');
|
|
@@ -112,7 +111,7 @@ class Runtime extends Controller
|
|
|
$this->success('清理系统配置成功!', 'javascript:location.reload()');
|
|
|
} catch (HttpResponseException $exception) {
|
|
|
throw $exception;
|
|
|
- } catch (Exception $exception) {
|
|
|
+ } catch (\Exception $exception) {
|
|
|
$this->error($exception->getMessage());
|
|
|
} else {
|
|
|
$this->error('只有超级管理员才能操作!');
|