forked from j62/ctbrec
1
0
Fork 0

Improve exception handling

Change exception handling so that failed post-processing causes the
recording to have the state "failed"
This commit is contained in:
0xboobface 2019-12-21 22:04:59 +01:00
parent fde24e80ea
commit f91a0d27eb
1 changed files with 3 additions and 2 deletions

View File

@ -30,9 +30,9 @@ import org.slf4j.LoggerFactory;
import ctbrec.Config;
import ctbrec.Model;
import ctbrec.Recording;
import ctbrec.Recording.State;
import ctbrec.io.HttpClient;
import ctbrec.recorder.download.Download;
import ctbrec.recorder.download.dash.FfmpegMuxer.ProcessExitedUncleanException;
import ctbrec.recorder.download.dash.SegmentTimelineType.S;
import okhttp3.Request;
import okhttp3.Response;
@ -340,8 +340,9 @@ public class DashDownload implements Download {
new FfmpegMuxer(dir, file);
targetFile = file;
recording.setPath(path.substring(0, path.length() - 5));
} catch (ProcessExitedUncleanException | IOException e) {
} catch (IOException e) {
LOG.error("Error while merging dash segments", e);
recording.setStatus(State.FAILED);
}
}