TASK: 全局异常优化;

This commit is contained in:
shahaibo
2023-10-31 14:07:43 +08:00
parent 68d28995b8
commit 44a30bf9b5
40 changed files with 517 additions and 211 deletions

View File

@@ -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);

View File

@@ -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");
}
}

View File

@@ -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);