# Class AsyncResource.AsyncExecutionException

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

All Implemented Interfaces:
  `Serializable`

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.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AsyncExecutionException(Throwable cause)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Throwable`
  `getCause()`
  `boolean`
  `isCancelled()`
  Returns true if this exception wraps a `CancellationException`, or another AsyncExecutionException that has `#isCancelled()` true.

  ### Methods inherited from class Throwable

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

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### AsyncExecutionException

    public AsyncExecutionException(Throwable cause)

- ## Method Details

  - ### getCause

    public Throwable getCause()
    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