Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 631 for Withrow (0.22 sec)

  1. android/guava-tests/test/com/google/common/io/CloserTest.java

        TestCloseable c2 = closer.register(TestCloseable.normal());
    
        IOException exception = new IOException();
    
        try {
          try {
            throw exception;
          } catch (Throwable e) {
            throw closer.rethrow(e);
          } finally {
            closer.close();
          }
        } catch (Throwable expected) {
          assertSame(exception, expected);
        }
    
        assertTrue(c1.isClosed());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/CloserTest.java

        TestCloseable c2 = closer.register(TestCloseable.normal());
    
        IOException exception = new IOException();
    
        try {
          try {
            throw exception;
          } catch (Throwable e) {
            throw closer.rethrow(e);
          } finally {
            closer.close();
          }
        } catch (Throwable expected) {
          assertSame(exception, expected);
        }
    
        assertTrue(c1.isClosed());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/Closer.java

     *   // do stuff
     * } catch (Throwable e) {
     *   // ensure that any checked exception types other than IOException that could be thrown are
     *   // provided here, e.g. throw closer.rethrow(e, CheckedException.class);
     *   throw closer.rethrow(e);
     * } finally {
     *   closer.close();
     * }
     * }</pre>
     *
     * <p>Note that this try-catch-finally block is not equivalent to a try-catch-finally block using
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  4. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

      public static class TwoArg {
        /** Action to take on a null param. */
        public enum Action {
          THROW_A_NPE {
            @Override
            public void act() {
              throw new NullPointerException();
            }
          },
          THROW_OTHER {
            @Override
            public void act() {
              throw new FooException();
            }
          },
          JUST_RETURN {
            @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 16 15:12:31 GMT 2023
    - 47.9K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/io/CharSource.java

        }
    
        Closer closer = Closer.create();
        try {
          Reader reader = closer.register(openStream());
          return countBySkipping(reader);
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      private long countBySkipping(Reader reader) throws IOException {
        long count = 0;
        long read;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 22.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/ByteSource.java

        }
        Closer closer = Closer.create();
        try {
          InputStream in = closer.register(openStream());
          return in.read() == -1;
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
       * Returns the size of this source in bytes, if the size can be easily determined without actually
       * opening the data stream.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 26.2K bytes
    - Viewed (0)
  7. .cm/plugins/filters/byCodeowner/ignore/index.js

    const throwError = (message, Ctor) => {
        throw new Ctor(message)
    }
    
    const checkPath = (path, originalPath, doThrow) => {
        if (!isString(path)) {
            return doThrow(
                `path must be a string, but got \`${originalPath}\``,
                TypeError
            )
        }
    
        // We don't know if we should ignore EMPTY, so throw
        if (!path) {
            return doThrow(`path must not be empty`, TypeError)
        }
    JavaScript
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Fri Apr 12 13:42:16 GMT 2024
    - 17.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/StreamsTest.java

        RuntimeException exception3 = new ArithmeticException("exception from stream 3");
        Stream<String> stream1 = Stream.of("foo", "bar").onClose(doThrow(exception1));
        Stream<String> stream2 = Stream.of("baz", "buh").onClose(doThrow(exception2));
        Stream<String> stream3 = Stream.of("quux").onClose(doThrow(exception3));
        RuntimeException exception = null;
        try (Stream<String> concatenated = Streams.concat(stream1, stream2, stream3)) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 20K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/Files.java

            return ByteStreams.toByteArray(in, in.getChannel().size());
          } catch (Throwable e) {
            throw closer.rethrow(e);
          } finally {
            closer.close();
          }
        }
    
        @Override
        public String toString() {
          return "Files.asByteSource(" + file + ")";
        }
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/reflect/ClassPathTest.java

            jarOut.putNextEntry(new ZipEntry(entry));
            Resources.copy(ClassPathTest.class.getResource(entry), jarOut);
            jarOut.closeEntry();
          }
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      private static Manifest manifest(String content) throws IOException {
        InputStream in = new ByteArrayInputStream(content.getBytes(US_ASCII));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Apr 26 14:02:27 GMT 2024
    - 24.9K bytes
    - Viewed (0)
Back to top