fix: 前端 DBMS->数据操作->新建查询,页面不显示查询结果

This commit is contained in:
wanli
2023-09-08 12:21:24 +08:00
parent b618b8f93b
commit c324a030f9
2 changed files with 8 additions and 2 deletions

View File

@@ -174,9 +174,15 @@ func (d *Db) ExecSqlFile(rc *req.Ctx) {
go func() {
defer func() {
if err := recover(); err != nil {
var errInfo string
switch t := err.(type) {
case biz.BizError:
errInfo = t.Error()
case *biz.BizError:
d.MsgApp.CreateAndSend(rc.LoginAccount, ws.ErrMsg("sql脚本执行失败", fmt.Sprintf("[%s]%s执行失败: [%s]", filename, dbConn.Info.GetLogDesc(), t.Error())))
errInfo = t.Error()
}
if len(errInfo) > 0 {
d.MsgApp.CreateAndSend(rc.LoginAccount, ws.ErrMsg("sql脚本执行失败", fmt.Sprintf("[%s]%s执行失败: [%s]", filename, dbConn.Info.GetLogDesc(), errInfo)))
}
}
}()