REFACTOR error handling
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user