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

@ -132,7 +132,9 @@ class UserController extends Controller
if (!$user) {
abort(500, '该用户不存在');
}
if (!$user->update($updateData)) {
try {
$user->update($updateData);
} catch (\Exception $e) {
abort(500, '保存失败');
}