- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,292 for rethrow (0.05 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) -
guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java
assertTrue(latch.await(5, SECONDS)); assertTrue(future.isDone()); assertFalse(future.isCancelled()); try { future.get(); fail("Future should rethrow the exception."); } catch (ExecutionException e) { assertThat(e).hasCauseThat().hasMessageThat().isEqualTo(message); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 3.3K 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/io/Flushables.java
private Flushables() {} /** * Flush a {@link Flushable}, with control over whether an {@code IOException} may be thrown. * * <p>If {@code swallowIOException} is true, then we don't rethrow {@code IOException}, but merely * log it. * * @param flushable the {@code Flushable} object to be flushed. * @param swallowIOException if true, don't propagate IO exceptions thrown by the {@code flush}
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed May 17 14:35:11 UTC 2023 - 2.5K bytes - Viewed (0) -
android/guava/src/com/google/common/io/Closeables.java
* try { * // ... code which does something with the stream ... * threw = false; * } finally { * // If an exception occurs, rethrow it only if threw==false: * Closeables.close(stream, threw); * } * } * }</pre> * * @param closeable the {@code Closeable} object to be closed, or null, in which case this method * does nothing
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed May 17 14:35:11 UTC 2023 - 4.7K 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)