REFACTOR error handling

This commit is contained in:
2025-06-03 09:58:31 +02:00
parent 30a576f8bb
commit 544a736f66

View File

@@ -40,12 +40,14 @@ public class MetadataService {
process = pb.start(); process = pb.start();
handleFfprobeError(process); handleFfprobeError(process);
logger.info("Metadata for file {} finished with exit code {}", file.getAbsolutePath(), process.exitValue()); logger.info("Metadata for file {} finished with exit code {}", file.getAbsolutePath(), process.exitValue());
process.destroy();
return parseVideoMetadata(readStandardOutput(process)); return parseVideoMetadata(readStandardOutput(process));
} catch (IOException | InterruptedException e) { } catch (InterruptedException e) {
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();
throw new FFMPEGException(e.getMessage()); throw new FFMPEGException(e.getMessage());
} catch (IOException e) {
throw new FFMPEGException(e.getMessage());
} }
} }
public VideoMetadata getInputFileMetadata(String uuid) { public VideoMetadata getInputFileMetadata(String uuid) {