public void setFailureListener(@Nullable LottieListener<Throwable> failureListener) {
    this.failureListener = failureListener;
  }
Set a default failure listener that will be called if any of the setAnimation APIs fail for any reason.
This can be used to replace the default behavior.
<p>
The default behavior will log any network errors and rethrow all other exceptions.
<p>
If you are loading an animation from the network, errors may occur if your user has no internet.
You can use this listener to retry the download or you can have it default to an error drawable
with {@link #setFallbackResource(int)}.
<p>
Unless you are using {@link #setAnimationFromUrl(String)}, errors are unexpected.
<p>
Set the listener to null to revert to the default behavior.
lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java