mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-25 19:06:38 +08:00
增加异常trace记录
This commit is contained in:
parent
28818bc8e1
commit
3a0f5b1953
@ -56,8 +56,7 @@ class Module extends Controller
|
|||||||
public function change()
|
public function change()
|
||||||
{
|
{
|
||||||
$data = $this->_vali(['name.require' => '模块名称不能为空!']);
|
$data = $this->_vali(['name.require' => '模块名称不能为空!']);
|
||||||
$online = ModuleService::online();
|
[$online, $locals] = [ModuleService::online(), ModuleService::getModules()];
|
||||||
$locals = ModuleService::getModules();
|
|
||||||
if (isset($online[$data['name']])) {
|
if (isset($online[$data['name']])) {
|
||||||
$this->module = $online[$data['name']];
|
$this->module = $online[$data['name']];
|
||||||
$this->current = $locals[$data['name']] ?? [];
|
$this->current = $locals[$data['name']] ?? [];
|
||||||
|
@ -78,6 +78,7 @@ class Oplog extends Controller
|
|||||||
} catch (HttpResponseException $exception) {
|
} catch (HttpResponseException $exception) {
|
||||||
throw $exception;
|
throw $exception;
|
||||||
} catch (Exception $exception) {
|
} catch (Exception $exception) {
|
||||||
|
trace_file($exception);
|
||||||
$this->error("日志清理失败,{$exception->getMessage()}");
|
$this->error("日志清理失败,{$exception->getMessage()}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,7 @@ class Queue extends Controller
|
|||||||
} catch (HttpResponseException $exception) {
|
} catch (HttpResponseException $exception) {
|
||||||
throw $exception;
|
throw $exception;
|
||||||
} catch (Exception $exception) {
|
} catch (Exception $exception) {
|
||||||
|
trace_file($exception);
|
||||||
$this->error($exception->getMessage());
|
$this->error($exception->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@ class Queue extends Controller
|
|||||||
} catch (HttpResponseException $exception) {
|
} catch (HttpResponseException $exception) {
|
||||||
throw $exception;
|
throw $exception;
|
||||||
} catch (Exception $exception) {
|
} catch (Exception $exception) {
|
||||||
|
trace_file($exception);
|
||||||
$this->error($exception->getMessage());
|
$this->error($exception->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -71,6 +72,7 @@ class Queue extends Controller
|
|||||||
} catch (HttpResponseException $exception) {
|
} catch (HttpResponseException $exception) {
|
||||||
throw $exception;
|
throw $exception;
|
||||||
} catch (Exception $exception) {
|
} catch (Exception $exception) {
|
||||||
|
trace_file($exception);
|
||||||
$this->error($exception->getMessage());
|
$this->error($exception->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,7 @@ class System extends Controller
|
|||||||
} catch (HttpResponseException $exception) {
|
} catch (HttpResponseException $exception) {
|
||||||
throw $exception;
|
throw $exception;
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
|
trace_file($exception);
|
||||||
$this->error($exception->getMessage());
|
$this->error($exception->getMessage());
|
||||||
} else {
|
} else {
|
||||||
$this->error('只有超级管理员才能操作!');
|
$this->error('只有超级管理员才能操作!');
|
||||||
@ -64,6 +65,7 @@ class System extends Controller
|
|||||||
} catch (HttpResponseException $exception) {
|
} catch (HttpResponseException $exception) {
|
||||||
throw $exception;
|
throw $exception;
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
|
trace_file($exception);
|
||||||
$this->error($exception->getMessage());
|
$this->error($exception->getMessage());
|
||||||
} else {
|
} else {
|
||||||
$this->error('只有超级管理员才能操作!');
|
$this->error('只有超级管理员才能操作!');
|
||||||
@ -131,6 +133,7 @@ class System extends Controller
|
|||||||
} catch (HttpResponseException $exception) {
|
} catch (HttpResponseException $exception) {
|
||||||
throw $exception;
|
throw $exception;
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
|
trace_file($exception);
|
||||||
$this->error($exception->getMessage());
|
$this->error($exception->getMessage());
|
||||||
} else {
|
} else {
|
||||||
$this->error('只有超级管理员才能操作!');
|
$this->error('只有超级管理员才能操作!');
|
||||||
|
@ -252,6 +252,7 @@ class Upload extends Controller
|
|||||||
} catch (HttpResponseException $exception) {
|
} catch (HttpResponseException $exception) {
|
||||||
throw $exception;
|
throw $exception;
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
|
trace_file($exception);
|
||||||
$this->error($exception->getMessage());
|
$this->error($exception->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -298,6 +299,7 @@ class Upload extends Controller
|
|||||||
} catch (HttpResponseException $exception) {
|
} catch (HttpResponseException $exception) {
|
||||||
throw $exception;
|
throw $exception;
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
|
trace_file($exception);
|
||||||
$this->error(lang($exception->getMessage()));
|
$this->error(lang($exception->getMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user