fix backup db catch

This commit is contained in:
bwcx_jzy 2022-01-04 14:40:50 +08:00
parent d459729a43
commit 512336462b
No known key found for this signature in database
GPG Key ID: 5E48E9372088B9E5
2 changed files with 3 additions and 4 deletions

View File

@ -44,8 +44,8 @@ public enum BackupStatusEnum implements BaseEnum {
this.desc = desc;
}
int code;
String desc;
final int code;
final String desc;
@Override
public int getCode() {

View File

@ -49,7 +49,6 @@ import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.io.File;
import java.sql.SQLException;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
@ -185,7 +184,7 @@ public class BackupInfoService extends BaseDbService<BackupInfoModel> {
backupInfo.setStatus(BackupStatusEnum.SUCCESS.getCode());
update(backupInfo);
DefaultSystemLog.getLog().info("start a new Thread to execute H2 Database backup...success");
} catch (SQLException e) {
} catch (Exception e) {
// 记录错误日志信息修改备份任务执行失败
DefaultSystemLog.getLog().error("start a new Thread to execute H2 Database backup...catch exception...message: {}, cause: {}",
e.getMessage(), e.getCause());