code: synchronized void error(@NotNull Exception e) {
          if (isFinished) {
              throw new RuntimeException("Promise already completed!");
          }
          if (e == null) {
              throw new RuntimeException("Error can't be null");
          }
          isFinished = true;
          exception = e;
          deliverResult();
      }
docs: Called when promise ended with error
  
  @param e error