Pass IOException into exception stack instead of ignoring it (#1913)

* Set IOException into exception stack

Signed-off-by: johnniang <johnniang@fastmail.com>

* Fix checkstyle error: newline needed
pull/1916/head
John Niang 2022-05-05 11:42:12 +08:00 committed by GitHub
parent 913002d56d
commit ff782c2e6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -152,7 +152,8 @@ public class LocalFileHandler implements FileHandler {
file.getOriginalFilename(), uploadFilePath.getFullPath());
return uploadResult;
} catch (IOException e) {
throw new FileOperationException("上传附件失败").setErrorData(uploadFilePath.getFullPath());
throw new FileOperationException("上传附件失败", e)
.setErrorData(uploadFilePath.getFullPath());
}
}