public synchronized LottieTask < T > addFailureListener ( LottieListener < Throwable > listener ) { if ( result != null && result . getException ( ) != null ) { listener . onResult ( result . getException ( ) ) ; } failureListeners . add ( listener ) ; return this ; }
Add a task failure listener . This will only be called in the even that an exception occurs . If an exception has already occurred the listener will be called immediately .