Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for throwIfUnchecked (0.23 sec)

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

        assertThrows(
            SomeUncheckedException.class, () -> throwIfUnchecked(new SomeUncheckedException()));
      }
    
      public void testThrowIfUnchecked_error() {
        assertThrows(SomeError.class, () -> throwIfUnchecked(new SomeError()));
      }
    
      @SuppressWarnings("ThrowIfUncheckedKnownChecked")
      public void testThrowIfUnchecked_checked() {
        throwIfUnchecked(new SomeCheckedException());
      }
    
      @J2ktIncompatible
    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/src/com/google/common/base/Throwables.java

       *   } catch (RuntimeException | Error t) {
       *     failure = t;
       *   }
       * }
       * if (failure != null) {
       *   throwIfUnchecked(failure);
       *   throw new AssertionError(failure);
       * }
       * </pre>
       *
       * @since 20.0
       */
      public static void throwIfUnchecked(Throwable throwable) {
        checkNotNull(throwable);
        if (throwable instanceof RuntimeException) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jul 19 16:02:36 UTC 2024
    - 20.7K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/Closer.java

     */
    
    package com.google.common.io;
    
    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.base.Throwables.throwIfInstanceOf;
    import static com.google.common.base.Throwables.throwIfUnchecked;
    
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.annotations.VisibleForTesting;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/base/ThrowablesTest.java

        assertThrows(
            SomeUncheckedException.class, () -> throwIfUnchecked(new SomeUncheckedException()));
      }
    
      public void testThrowIfUnchecked_error() {
        assertThrows(SomeError.class, () -> throwIfUnchecked(new SomeError()));
      }
    
      @SuppressWarnings("ThrowIfUncheckedKnownChecked")
      public void testThrowIfUnchecked_checked() {
        throwIfUnchecked(new SomeCheckedException());
      }
    
      @J2ktIncompatible
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  5. guava/src/com/google/common/io/Closer.java

     */
    
    package com.google.common.io;
    
    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.base.Throwables.throwIfInstanceOf;
    import static com.google.common.base.Throwables.throwIfUnchecked;
    
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.annotations.VisibleForTesting;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/CloserTest.java

     * limitations under the License.
     */
    
    package com.google.common.io;
    
    import static com.google.common.base.Throwables.throwIfInstanceOf;
    import static com.google.common.base.Throwables.throwIfUnchecked;
    import static com.google.common.truth.Truth.assertThat;
    
    import com.google.common.base.MoreObjects;
    import com.google.common.base.Objects;
    import com.google.common.collect.ImmutableList;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/CloserTest.java

     * limitations under the License.
     */
    
    package com.google.common.io;
    
    import static com.google.common.base.Throwables.throwIfInstanceOf;
    import static com.google.common.base.Throwables.throwIfUnchecked;
    import static com.google.common.truth.Truth.assertThat;
    
    import com.google.common.base.MoreObjects;
    import com.google.common.base.Objects;
    import com.google.common.collect.ImmutableList;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  8. guava/src/com/google/common/io/TempFileCreator.java

    package com.google.common.io;
    
    import static com.google.common.base.StandardSystemProperty.JAVA_IO_TMPDIR;
    import static com.google.common.base.StandardSystemProperty.USER_NAME;
    import static com.google.common.base.Throwables.throwIfUnchecked;
    import static java.nio.file.attribute.AclEntryFlag.DIRECTORY_INHERIT;
    import static java.nio.file.attribute.AclEntryFlag.FILE_INHERIT;
    import static java.nio.file.attribute.AclEntryType.ALLOW;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 06 17:11:11 UTC 2023
    - 12.5K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

        try {
          return generator.invoke(this, args);
        } catch (InvocationTargetException e) {
          throwIfUnchecked(e.getCause());
          throw new RuntimeException(e.getCause());
        } catch (Exception e) {
          throwIfUnchecked(e);
          throw new RuntimeException(e);
        }
      }
    
      private final class FreshInvocationHandler extends AbstractInvocationHandler {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/testing/ClassSanityTester.java

    package com.google.common.testing;
    
    import static com.google.common.base.Preconditions.checkArgument;
    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.base.Throwables.throwIfUnchecked;
    import static com.google.common.testing.NullPointerTester.isNullable;
    
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:18:12 UTC 2024
    - 32.7K bytes
    - Viewed (0)
Back to top