@Synchronized fun completeExceptionally(exception: Exception): Unit
(source)
This completes the result with the specified Exception. IllegalStateException is thrown if the result is already complete.
exception
- The Exception used to complete the result.