SUPPORT-8771:check exitCode

This commit is contained in:
adel.kalimullin 2024-12-10 13:57:12 +03:00
parent 965a90549b
commit eb555fdcb7

View file

@ -57,6 +57,10 @@ public class FileScanService {
try (InputStream inputStream = process.getInputStream()) {
String result = new String(inputStream.readAllBytes());
process.waitFor();
int exitCode = process.waitFor();
if (exitCode != 0 && exitCode != 72) {
throw new AvException("Ошибка KESL, код завершения: " + exitCode);
}
return result;
}
}