- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 594 for rethrow (0.11 sec)
-
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;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 25.5K bytes - Viewed (0) -
guava/src/com/google/common/io/Closer.java
throw new RuntimeException(e); } /** * Stores the given throwable and rethrows it. It will be rethrown as is if it is an {@code * IOException}, {@code RuntimeException}, {@code Error} or a checked exception of the given type. * Otherwise, it will be rethrown wrapped in a {@code RuntimeException}. <b>Note:</b> Be sure to * declare all of the checked exception types your try block can throw when calling an overload of
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue May 07 15:26:58 UTC 2024 - 10.4K bytes - Viewed (0) -
android/guava/src/com/google/common/io/Closer.java
throw new RuntimeException(e); } /** * Stores the given throwable and rethrows it. It will be rethrown as is if it is an {@code * IOException}, {@code RuntimeException}, {@code Error} or a checked exception of the given type. * Otherwise, it will be rethrown wrapped in a {@code RuntimeException}. <b>Note:</b> Be sure to * declare all of the checked exception types your try block can throw when calling an overload of
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue May 07 15:26:58 UTC 2024 - 10.4K bytes - Viewed (0) -
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());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue May 07 15:26:58 UTC 2024 - 11.8K bytes - Viewed (0) -
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());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue May 07 15:26:58 UTC 2024 - 11.8K bytes - Viewed (0) -
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.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 26.2K bytes - Viewed (0) -
android/guava/src/com/google/common/eventbus/SubscriberRegistry.java
* prefer to propagate an IllegalArgumentException to the caller. However, we don't want to * simply rethrow an exception (e.getCause()) that may in rare cases have come from another * thread. To accomplish both goals, we wrap that IllegalArgumentException in a new * instance. */ throw new IllegalArgumentException(e.getCause().getMessage(), e.getCause()); } /*
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 15:16:45 UTC 2024 - 10.8K bytes - Viewed (0) -
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 + ")"; } } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Jul 22 19:03:12 UTC 2024 - 33.1K bytes - Viewed (0) -
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 + ")"; } } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Jul 22 19:03:12 UTC 2024 - 33.1K bytes - Viewed (0) -
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));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 22:09:38 UTC 2024 - 25K bytes - Viewed (0)