mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-02 15:30:25 +08:00
fix: 数据库导出失败时向前端发消息
This commit is contained in:
@@ -247,6 +247,15 @@ func (d *Db) DumpSql(rc *req.Ctx) {
|
||||
extName = ""
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
switch t := err.(type) {
|
||||
case *biz.BizError:
|
||||
d.MsgApp.CreateAndSend(rc.LoginAccount, ws.ErrMsg("数据库导出失败", t.Error()))
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
// 是否需要导出表结构
|
||||
needStruct := dumpType == "1" || dumpType == "3"
|
||||
// 是否需要导出数据
|
||||
|
||||
Reference in New Issue
Block a user