Guava ExecutionError - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Guava ExecutionError class.

This code example shows how to use the following methods:getCause
    try { 
      cache.getUnchecked(new Object()); 
    } catch (ExecutionError expected) {
      assertEquals(cause, expected.getCause());
    Object newValue = new Object(); 
    assertSame(newValue, cache.getUnchecked(new Object()));
  public void testGetUnchecked_otherThrowable() { 
    final Throwable cause = new Throwable();
    final AtomicReference<Object> valueRef = new AtomicReference<Object>();
    LoadingCache<Object, Object> cache = new AbstractLoadingCache<Object, Object>() {
      public Object get(Object key) throws ExecutionException { 
        Object v = valueRef.get();