Skip to content

Commit

Permalink
Pass IOException into exception stack instead of ignoring it (halo-de…
Browse files Browse the repository at this point in the history
…v#1913)

* Set IOException into exception stack

Signed-off-by: johnniang <[email protected]>

* Fix checkstyle error: newline needed
  • Loading branch information
JohnNiang authored May 5, 2022
1 parent 913002d commit ff782c2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ public UploadResult upload(@NonNull MultipartFile file) {
file.getOriginalFilename(), uploadFilePath.getFullPath());
return uploadResult;
} catch (IOException e) {
throw new FileOperationException("上传附件失败").setErrorData(uploadFilePath.getFullPath());
throw new FileOperationException("上传附件失败", e)
.setErrorData(uploadFilePath.getFullPath());
}
}

Expand Down

0 comments on commit ff782c2

Please sign in to comment.