Code example for ExecutionException

Methods: getCause

0
                } catch (InterruptedException e) {
                    android.util.Log.w(LOG_TAG, e);
                } catch (ExecutionException e) {
                    throw new RuntimeException(
                            "An error occured while executing doInBackground()", 
                            e.getCause());
                } catch (CancellationException e) {
                    postResultIfNotInvoked(null); 
                } 
            } 
        }; 
    } 
 
    private void postResultIfNotInvoked(Result result) {
        final boolean wasTaskInvoked = mTaskInvoked.get();
        if (!wasTaskInvoked) {
            postResult(result);
        } 
    } 
 
    private Result postResult(Result result) {