优化文件获取异常处理
This commit is contained in:
@@ -16,6 +16,8 @@ import xtools.base.config.BaseParams;
|
||||
import xtools.boot.api.enums.FileDataType;
|
||||
import xtools.boot.api.exection.BizError;
|
||||
import xtools.boot.api.model.dto.Result;
|
||||
import xtools.boot.log.LogBus;
|
||||
import xtools.boot.log.enums.LogBusBaseType;
|
||||
import xtools.boot.storage.base.config.StorageConfig;
|
||||
import xtools.boot.storage.base.service.StorageService;
|
||||
import xtools.core.CollectionUtils;
|
||||
@@ -24,6 +26,7 @@ import xtools.core.HexUtils;
|
||||
import xtools.core.StringUtils;
|
||||
import xtools.core.UuidUtils;
|
||||
import xtools.core.encrypt.Md5Utils;
|
||||
import xtools.core.enums.LogLevel;
|
||||
import xtools.core.extend.CheckUtils;
|
||||
import xtools.core.time.CalendarUtils;
|
||||
import xtools.extend.encrypt.Sm3Utils;
|
||||
@@ -264,7 +267,12 @@ public class SysFileOptServiceImpl implements SysFileOptService, BaseParams {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
storageService.get(data.getBucket(), data.getFilePath(), outputStream);
|
||||
try {
|
||||
storageService.get(data.getBucket(), data.getFilePath(), outputStream);
|
||||
} catch (Exception e) {
|
||||
LogBus.init(LogLevel.ERROR, LogBusBaseType.STORAGE).data(data).print(false).error(e).save();
|
||||
return null;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user