public synchronized LottieTask<T> addFailureListener(LottieListener<Throwable> listener) {
    LottieResult<T> result = this.result;
    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.

@return the task for call chaining.
lottie/src/main/java/com/airbnb/lottie/LottieTask.java