Code example for ExecutionException

Methods: d, getCause

0
						callOnCompletedOnMainThread(result);
					} catch (InterruptedException e) {
						Log.d(TAG, "%s", e);
						callOnFailedOnMainThread(e);
					} catch (ExecutionException e) {
						Log.d(TAG, "%s", e);
						// Try to unwrap exception 
						Throwable cause = e.getCause();
						if (cause != null && cause instanceof Exception) {
							callOnFailedOnMainThread((Exception) cause);							
						} else { 
							callOnFailedOnMainThread(e);
						} 
					} catch (CancellationException e) {
						// Silently ignore cancellation 
					} catch (Exception e) {
						Log.d(TAG, "%s", e);
						callOnFailedOnMainThread(e);
					} catch (Throwable t) {
						Log.d(TAG, "%s", t);
						callOnFailedOnMainThread(new RuntimeException(t));