|
@@ -3,6 +3,7 @@ package com.fdkankan.fusion.common.util;
|
|
|
import com.fdkankan.fusion.common.ResultCode;
|
|
|
import com.fdkankan.fusion.config.CacheUtil;
|
|
|
import com.fdkankan.fusion.exception.BusinessException;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import java.io.*;
|
|
@@ -15,6 +16,7 @@ import java.util.regex.Pattern;
|
|
|
|
|
|
import static cn.hutool.core.util.ClassUtil.getClassLoader;
|
|
|
|
|
|
+@Slf4j
|
|
|
public class FileWriterUtil {
|
|
|
|
|
|
public static void writerJson(String tagPath,String fileName,String msg){
|
|
@@ -120,8 +122,10 @@ public class FileWriterUtil {
|
|
|
if(multiply.compareTo(new BigDecimal(canUseSpace)) >= 1){
|
|
|
throw new BusinessException(ResultCode.USE_SPACE_ERROR);
|
|
|
}
|
|
|
-
|
|
|
+ }catch ( BusinessException e){
|
|
|
+ throw e;
|
|
|
}catch (Exception e){
|
|
|
+ log.info("error:{}",e);
|
|
|
throw new BusinessException(ResultCode.SPACE_ERROR);
|
|
|
}
|
|
|
}
|