Throw Exception if posting to application handler fails.

PiperOrigin-RevId: 568799683
This commit is contained in:
samrobinson 2023-09-27 03:28:33 -07:00 committed by Copybara-Service
parent c12fb67468
commit 4e10c41bcc

View File

@ -399,23 +399,25 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
return;
}
ExportException finalException = exception;
checkState(
applicationHandler.post(
() ->
listener.onError(
processedInputsBuilder.build(),
encoderFactory.getAudioEncoderName(),
encoderFactory.getVideoEncoderName(),
finalException));
finalException)));
} else {
if (releasedPreviously) {
return;
}
checkState(
applicationHandler.post(
() ->
listener.onCompleted(
processedInputsBuilder.build(),
encoderFactory.getAudioEncoderName(),
encoderFactory.getVideoEncoderName()));
encoderFactory.getVideoEncoderName())));
}
}