TASK: 全局异常优化;
This commit is contained in:
@@ -27,7 +27,7 @@ public class AccessLimitUtils {
|
||||
Integer useCount = LocalCacheUtils.getAidaInterfaceCurrentLimitingCache(interfaceName);
|
||||
if (useCount > count) {
|
||||
//系统繁忙
|
||||
throw new BusinessException("system busy !");
|
||||
throw new BusinessException("system.busy");
|
||||
} else {
|
||||
useCount++;
|
||||
LocalCacheUtils.setAidaInterfaceCurrentLimitingCache(interfaceName, useCount);
|
||||
|
||||
@@ -175,7 +175,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
|
||||
return url.openStream();
|
||||
} catch (IOException ioException) {
|
||||
log.error("获取文件尺寸异常###{}###path##{}", ExceptionUtil.stacktraceToString(ioException), path);
|
||||
throw new BusinessException("get file is failed!");
|
||||
throw new BusinessException("get.file.failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ public class MinioUtil {
|
||||
|
||||
public InputStream download(String path) throws MinioException, IOException {
|
||||
if (!path.contains("/")) {
|
||||
throw new BusinessException("The path is error!");
|
||||
throw new BusinessException("the.path.is.error");
|
||||
}
|
||||
int index = path.indexOf("/");
|
||||
String bucketName = path.substring(0, index);
|
||||
|
||||
Reference in New Issue
Block a user