File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
example/src/main/java/net/ypresto/androidtranscoder/example
lib/src/main/java/net/ypresto/androidtranscoder Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 1212import android .widget .Toast ;
1313
1414import net .ypresto .androidtranscoder .MediaTranscoder ;
15- import net .ypresto .androidtranscoder .strategy .DefaultVideoStrategy ;
1615import net .ypresto .androidtranscoder .utils .Logger ;
1716
1817import java .io .File ;
@@ -111,7 +110,7 @@ public void onTranscodeCanceled() {
111110 }
112111
113112 @ Override
114- public void onTranscodeFailed (@ NonNull Exception exception ) {
113+ public void onTranscodeFailed (@ NonNull Throwable exception ) {
115114 onTranscodeFinished (false , "Transcoder error occurred." );
116115 }
117116 }).transcode ();
Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ public void onProgress(final double progress) {
138138 throw e ;
139139 } catch (Throwable e ) {
140140 LOG .e ("Unexpected error while transcoding" , e );
141+ listenerWrapper .onTranscodeFailed (e );
141142 throw e ;
142143 }
143144 return null ;
@@ -172,11 +173,8 @@ public interface Listener {
172173
173174 /**
174175 * Called when transcode failed.
175- *
176- * @param exception Exception thrown from {@link MediaTranscoderEngine#transcode(MediaTranscoderOptions)}.
177- * Note that it IS NOT {@link java.lang.Throwable}. This means {@link java.lang.Error} won't be caught.
178176 */
179- void onTranscodeFailed (@ NonNull Exception exception );
177+ void onTranscodeFailed (@ NonNull Throwable exception );
180178 }
181179
182180 /**
@@ -220,7 +218,7 @@ public void run() {
220218 }
221219
222220 @ Override
223- public void onTranscodeFailed (@ NonNull final Exception exception ) {
221+ public void onTranscodeFailed (@ NonNull final Throwable exception ) {
224222 mHandler .post (new Runnable () {
225223 @ Override
226224 public void run () {
You can’t perform that action at this time.
0 commit comments