mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-03 16:00:25 +08:00
fix: 数据库导出失败时向前端发消息
This commit is contained in:
@@ -247,6 +247,15 @@ func (d *Db) DumpSql(rc *req.Ctx) {
|
|||||||
extName = ""
|
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"
|
needStruct := dumpType == "1" || dumpType == "3"
|
||||||
// 是否需要导出数据
|
// 是否需要导出数据
|
||||||
|
|||||||
Reference in New Issue
Block a user