SUPPORT-8841: change to exception

This commit is contained in:
Alexandr Shalaginov 2025-01-13 08:18:08 +03:00
parent f8482124ba
commit f6fea26f85

View file

@ -81,9 +81,11 @@ public class FileScanService {
private void checkScanResult(String result, String originalFileName) {
if (!result.contains(passwordProtectedResultName)) {
LOGGER.warn("File scan result doesn't contains \"{}\", "
+ "please check property \"password.protected.result.name\" is correct",
passwordProtectedResultName);
throw new AvException(String.format(
"File scan result doesn't contains \"%s\", "
+ "please check property \"password.protected.result.name\" is correct",
passwordProtectedResultName
));
}
for (String line : result.split("\n")) {