- Sort Score
- Result 10 results
- Languages All
Results 1361 - 1370 of 2,073 for catch (0.05 sec)
-
guava-tests/test/com/google/common/cache/CacheLoadingTest.java
} // subsequent calls should call the loader again, not get the old exception try { cache.getUnchecked("bar"); fail(); } catch (InvalidCacheLoadException expected) { } assertEquals(2, callCount.get()); } /** * On a concurrent computation that throws an unchecked exception, all threads should get theRegistered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 85.7K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbResourceLocatorImplTest.java
when(ctx.getNameServiceClient()).thenReturn(nsc); } private static URL smbUrl(String spec) { try { return new URL(null, spec, SMB_HANDLER); } catch (Exception e) { throw new AssertionError(e); } } private SmbResourceLocatorImpl locator(String spec) { return new SmbResourceLocatorImpl(ctx, smbUrl(spec)); } @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 17.6K bytes - Viewed (0) -
api/maven-api-xml/src/main/java/org/apache/maven/api/xml/XmlNode.java
try { StringWriter writer = new StringWriter(); XmlService.write(this, writer); return writer.toString(); } catch (IOException e) { return toStringObject(); } } private String toStringObject() { StringBuilder sb = new StringBuilder();Registered: Sun Sep 07 03:35:12 UTC 2025 - Last Modified: Sat Jul 19 11:09:56 UTC 2025 - 18.2K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/query/MatchAllQueryCommandTest.java
float boost = -1.0f; try { matchAllQueryCommand.execute(context, query, boost); fail("Should throw IllegalArgumentException for negative boost"); } catch (IllegalArgumentException e) { // Expected exception assertTrue(e.getMessage().contains("negative [boost] are not allowed")); } }Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Tue Aug 19 14:09:36 UTC 2025 - 16.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/Utf8Test.java
} private static void testEncodedLengthFails(String invalidString, int invalidCodePointIndex) { try { Utf8.encodedLength(invalidString); fail(); } catch (IllegalArgumentException expected) { assertThat(expected) .hasMessageThat() .isEqualTo("Unpaired surrogate at index " + invalidCodePointIndex); } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 12.8K bytes - Viewed (0) -
src/test/java/jcifs/context/BaseContextTest.java
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 15.1K bytes - Viewed (0) -
docs/en/docs/tutorial/handling-errors.md
This way, if any part of Starlette's internal code, or a Starlette extension or plug-in, raises a Starlette `HTTPException`, your handler will be able to catch and handle it. In this example, to be able to have both `HTTPException`s in the same code, Starlette's exceptions is renamed to `StarletteHTTPException`: ```Python
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 9.4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/TreeMultiset.java
E e = (E) element; AvlNode<E> root = rootReference.get(); if (!range.contains(e) || root == null) { return 0; } return root.count(comparator(), e); } catch (ClassCastException | NullPointerException e) { return 0; } } @CanIgnoreReturnValue @Override public int add(@ParametricNullness E element, int occurrences) {Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 33.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/FloatsTest.java
// it's shared to avoid using too much memory in tests float[] sharedArray = new float[arraysDim2]; Arrays.fill(arrays, sharedArray); try { Floats.concat(arrays); fail(); } catch (IllegalArgumentException expected) { } } public void testEnsureCapacity() { assertThat(Floats.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 29.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/IntsTest.java
} private static void assertCastFails(long value) { try { Ints.checkedCast(value); fail("Cast to int should have failed: " + value); } catch (IllegalArgumentException ex) { assertWithMessage(value + " not found in exception text: " + ex.getMessage()) .that(ex.getMessage().contains(String.valueOf(value))) .isTrue(); } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 29.2K bytes - Viewed (0)