fix elq update try catch

This commit is contained in:
Tokumeikoi
2020-03-17 14:28:47 +08:00
parent 7bb4852cca
commit 96f562a9e7
8 changed files with 33 additions and 12 deletions

View File

@ -64,7 +64,9 @@ class ServerController extends Controller
if (!$server) {
abort(500, '服务器不存在');
}
if (!$server->update($params)) {
try {
$server->update($params);
} catch (\Exception $e) {
abort(500, '保存失败');
}
return response([
@ -163,7 +165,9 @@ class ServerController extends Controller
if (!$server) {
abort(500, '该服务器不存在');
}
if (!$server->update($params)) {
try {
$server->update($params);
} catch (\Exception $e) {
abort(500, '保存失败');
}