소스 검색

上传异常处理

Raod 3 년 전
부모
커밋
7c70df8a66

+ 3 - 1
report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/service/impl/GaeaFileServiceImpl.java

@@ -122,7 +122,9 @@ public class GaeaFileServiceImpl implements GaeaFileService {
             }
             // 将完整的http访问路径返回
             return gaeaFile;
-        } catch (Exception e) {
+        } catch (BusinessException e){
+            throw BusinessExceptionBuilder.build(e.getCode());
+        }catch (Exception e) {
             log.error("file upload error", e);
             throw BusinessExceptionBuilder.build(ResponseCode.FILE_UPLOAD_ERROR);
         }