Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 270 for RuntimeException (0.15 sec)

  1. guava-tests/test/com/google/common/base/ThrowablesTest.java

        assertThrows(SomeError.class, () -> propagate(new SomeError()));
      }
    
      @J2ktIncompatible
      @GwtIncompatible // propagate
      public void testPropagate_noneDeclared_checked() {
        RuntimeException expected =
            assertThrows(RuntimeException.class, () -> propagate(new SomeCheckedException()));
        assertThat(expected).hasCauseThat().isInstanceOf(SomeCheckedException.class);
      }
    
      @GwtIncompatible // throwIfInstanceOf
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/base/StringsRepeatBenchmark.java

      @Benchmark
      void oldRepeat(long reps) {
        for (int i = 0; i < reps; i++) {
          String x = oldRepeat(originalString, count);
          if (x.length() != (originalString.length() * count)) {
            throw new RuntimeException("Wrong length: " + x);
          }
        }
      }
    
      private static String oldRepeat(String string, int count) {
        // If this multiplication overflows, a NegativeArraySizeException or
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Sep 17 20:24:24 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/testing/ForwardingWrapperTester.java

      }
    
      private static <T> void testExceptionPropagation(
          Class<T> interfaceType, Method method, Function<? super T, ? extends T> wrapperFunction) {
        RuntimeException exception = new RuntimeException();
        T proxy =
            Reflection.newProxy(
                interfaceType,
                new AbstractInvocationHandler() {
                  @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 13:00:28 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java

              @Override
              void afterRanInterruptiblyFailure(Throwable error) {}
            };
        Thread runner = new Thread(task);
        runner.start();
        isInterruptibleRegistered.await();
        RuntimeException expected = assertThrows(RuntimeException.class, () -> task.interruptTask());
        assertThat(expected)
            .hasMessageThat()
            .isEqualTo("I bet you didn't think Thread.interrupt could throw");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/testers/TestExceptions.java

      static class SomeOtherCheckedException extends Exception {}
    
      static class YetAnotherCheckedException extends Exception {}
    
      static class SomeUncheckedException extends RuntimeException {}
    
      static class SomeChainingException extends RuntimeException {
        public SomeChainingException(Throwable cause) {
          super(cause);
        }
      }
    
      private TestExceptions() {}
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/TestExceptions.java

      static class SomeOtherCheckedException extends Exception {}
    
      static class YetAnotherCheckedException extends Exception {}
    
      static class SomeUncheckedException extends RuntimeException {}
    
      static class SomeChainingException extends RuntimeException {
        public SomeChainingException(Throwable cause) {
          super(cause);
        }
      }
    
      private TestExceptions() {}
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  7. build-logic/documentation/src/main/groovy/gradlebuild/docs/dsl/docbook/DslDocModel.groovy

                throw new RuntimeException("Cycle building $className. Currently building $currentlyBuilding")
            }
            currentlyBuilding.addLast(className)
            try {
                ClassMetaData classMetaData = classMetaData.find(className)
                if (!classMetaData) {
                    if (!className.contains('.internal.')) {
                        throw new RuntimeException("No meta-data found for class '$className'.")
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 4.9K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/testers/TestExceptions.java

      static class SomeOtherCheckedException extends Exception {}
    
      static class YetAnotherCheckedException extends Exception {}
    
      static class SomeUncheckedException extends RuntimeException {}
    
      static class SomeChainingException extends RuntimeException {
        public SomeChainingException(Throwable cause) {
          super(cause);
        }
      }
    
      private TestExceptions() {}
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  9. guava-testlib/test/com/google/common/testing/TearDownStackTest.java

          fail("runTearDown should have thrown an exception");
        } catch (ClusterException expected) {
          assertThat(expected).hasCauseThat().hasMessageThat().isEqualTo("two");
        } catch (RuntimeException e) {
          throw new RuntimeException(
              "A ClusterException should have been thrown, rather than a " + e.getClass().getName(), e);
        }
    
        assertEquals(true, tearDownOne.ran);
        assertEquals(true, tearDownTwo.ran);
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 21 10:19:29 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  10. android/guava-testlib/test/com/google/common/testing/TearDownStackTest.java

          fail("runTearDown should have thrown an exception");
        } catch (ClusterException expected) {
          assertThat(expected).hasCauseThat().hasMessageThat().isEqualTo("two");
        } catch (RuntimeException e) {
          throw new RuntimeException(
              "A ClusterException should have been thrown, rather than a " + e.getClass().getName(), e);
        }
    
        assertEquals(true, tearDownOne.ran);
        assertEquals(true, tearDownTwo.ran);
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 21 10:19:29 UTC 2024
    - 4.6K bytes
    - Viewed (0)
Back to top