# Class AsyncResource.AsyncExecutionException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.codename1.util.AsyncResource.AsyncExecutionException

Enclosing class:
  `AsyncResource<V>`

public static class AsyncResource.AsyncExecutionException extends RuntimeException

Exception to wrap exceptions that are thrown during asynchronous execution. This is thrown by `#get()` if the this resource failed with an exception.

Call `AsyncExecutionException#getCause()` to get the original exception.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AsyncExecutionException(Throwable cause)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Throwable`
  `getCause()`
  Returns the cause of this throwable or null if the cause is nonexistent or unknown.
  `boolean`
  `isCancelled()`
  Returns true if this exception wraps a `CancellationException`, or another AsyncExecutionException that has `#isCancelled()` true.

  ### Methods inherited from class Throwable

  `addSuppressed, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### AsyncExecutionException

    public AsyncExecutionException(Throwable cause)

- ## Method Details

  - ### getCause

    public Throwable getCause()
    Description copied from class: `Throwable`
    Returns the cause of this throwable or null if the cause is nonexistent or unknown.
    Overrides:
      `getCause` in class `Throwable`

  - ### isCancelled

    public boolean isCancelled()

    Returns true if this exception wraps a `CancellationException`, or another AsyncExecutionException that has `#isCancelled()` true.

    ###### Returns

    True if this exception was caused by cancelling an AsyncResource.

    ###### Since

    7.0