Skip to content

Commit 01e77e2

Browse files
authored
Merge pull request #13256 from pierreeurope/fix/ttml-postprocessing-error-reporting
Fix subtitle post-processing error losing original exception
2 parents 4cfd36c + 95367dd commit 01e77e2

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

app/src/main/java/us/shandian/giga/postprocessing/TtmlConverter.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,12 @@ int process(SharpStream out, SharpStream... sources) throws IOException {
2929

3030
try {
3131
writer.build(sources[0]);
32+
} catch (IOException err) {
33+
Log.e(TAG, "subtitle conversion failed due to I/O error", err);
34+
throw err;
3235
} catch (Exception err) {
33-
Log.e(TAG, "subtitle parse failed", err);
34-
return err instanceof IOException ? 1 : 8;
36+
Log.e(TAG, "subtitle conversion failed", err);
37+
throw new IOException("TTML to SRT conversion failed", err);
3538
}
3639

3740
return OK_RESULT;

0 commit comments

Comments
 (0)