Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 81 for setException (0.18 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

        SettableFuture<Object> future3 = SettableFuture.create();
        ListenableFuture<List<Object>> all = allAsList(future1, future2, future3);
    
        future1.setException(new MyException());
        future2.setException(new MyException());
        future3.setException(new MyException());
    
        try {
          getDone(all);
          fail();
        } catch (ExecutionException expected) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/UncheckedThrowingFuture.java

        return new UncheckedThrowingFuture<V>();
      }
    
      public void complete(RuntimeException e) {
        if (!super.setException(new WrapperException(checkNotNull(e)))) {
          throw new IllegalStateException("Future was already complete: " + this);
        }
      }
    
      public void complete(Error e) {
        if (!super.setException(new WrapperException(checkNotNull(e)))) {
          throw new IllegalStateException("Future was already complete: " + this);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 12 20:02:10 GMT 2018
    - 3.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/AggregateFutureState.java

         * immediately fails with the same exception:
         *
         * Thread1: calls setException(), which returns true, context switch before it can CAS
         * seenExceptions to its exception
         *
         * Thread2: calls setException(), which returns false, CASes seenExceptions to its exception,
         * and wrongly believes that its exception is new (leading it to logging it when it shouldn't)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 14 20:35:03 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

        assertThat(future.set(1)).isTrue();
        assertSuccessful(future, 1);
      }
    
      public void testFailed() throws Exception {
        Exception cause = new Exception();
        assertThat(future.setException(cause)).isTrue();
        assertFailed(future, cause);
      }
    
      public void testCanceled() throws Exception {
        assertThat(future.cancel(false /* mayInterruptIfRunning */)).isTrue();
        assertCancelled(future, false);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/CombinedFuture.java

             */
            CombinedFuture.this.setException(((ExecutionException) error).getCause());
          } else if (error instanceof CancellationException) {
            cancel(false);
          } else {
            CombinedFuture.this.setException(error);
          }
        }
    
        abstract void setValue(@ParametricNullness T value);
      }
    
      @WeakOuter
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  6. maven-api-impl/src/main/java/org/apache/maven/internal/impl/resolver/DefaultArtifactDescriptorReader.java

                } catch (ModelBuilderException e) {
                    for (ModelProblem problem : e.getResult().getProblems()) {
                        if (problem.getException() instanceof ModelResolverException) {
                            result.addException(problem.getException());
                            throw new ArtifactDescriptorException(result);
                        }
                    }
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu May 02 15:10:38 GMT 2024
    - 14.6K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/AbstractChainedListenableFutureTest.java

      }
    
      public void testFutureGetThrowsWrappedException() throws Exception {
        inputFuture.setException(EXCEPTION);
        listener.assertException(EXCEPTION);
      }
    
      public void testFutureGetThrowsWrappedError() throws Exception {
        Error error = new Error();
        inputFuture.setException(error);
        // Verify that get throws an ExecutionException, caused by an Error, when
        // the callback is called.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/UncheckedThrowingFuture.java

        return new UncheckedThrowingFuture<V>();
      }
    
      public void complete(RuntimeException e) {
        if (!super.setException(new WrapperException(checkNotNull(e)))) {
          throw new IllegalStateException("Future was already complete: " + this);
        }
      }
    
      public void complete(Error e) {
        if (!super.setException(new WrapperException(checkNotNull(e)))) {
          throw new IllegalStateException("Future was already complete: " + this);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 12 20:02:10 GMT 2018
    - 3.2K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

        SettableFuture<Object> future3 = SettableFuture.create();
        ListenableFuture<List<Object>> all = allAsList(future1, future2, future3);
    
        future1.setException(new MyException());
        future2.setException(new MyException());
        future3.setException(new MyException());
    
        try {
          getDone(all);
          fail();
        } catch (ExecutionException expected) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/TimeoutFuture.java

           * class with a manual reference back to the "containing" class.)
           *
           * This has the nice-ish side effect of limiting reentrancy: run() calls
           * timeoutFuture.setException() calls run(). That reentrancy would already be harmless, since
           * timeoutFuture can be set (and delegate cancelled) only once. (And "set only once" is
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 7.7K bytes
    - Viewed (0)
Back to top