- Sort Score
- Result 10 results
- Languages All
Results 761 - 770 of 1,922 for Try (0.03 sec)
-
guava-tests/test/com/google/common/io/BaseEncodingTest.java
} }, DECODE { @Override void assertFailsToDecode( BaseEncoding encoding, String cannotDecode, @Nullable String expectedMessage) { try { encoding.decode(cannotDecode); fail("Expected IllegalArgumentException"); } catch (IllegalArgumentException expected) { if (expectedMessage != null) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 16:27:30 UTC 2024 - 24.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/guide/GetExample.java
public class GetExample { final OkHttpClient client = new OkHttpClient(); String run(String url) throws IOException { Request request = new Request.Builder() .url(url) .build(); try (Response response = client.newCall(request).execute()) { return response.body().string(); } } public static void main(String[] args) throws IOException { GetExample example = new GetExample();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 1.3K bytes - Viewed (0) -
fastapi/concurrency.py
# to avoid this we let __exit__ run without a capacity limit # since we're creating a new limiter for each call, any non-zero limit # works (1 is arbitrary) exit_limiter = CapacityLimiter(1) try: yield await run_in_threadpool(cm.__enter__) except Exception as e: ok = bool( await anyio.to_thread.run_sync( cm.__exit__, type(e), e, None, limiter=exit_limiter
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Dec 25 17:57:35 UTC 2023 - 1.4K bytes - Viewed (0) -
impl/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 13.4K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/testing/PlatformRule.kt
@JvmStatic fun isAlpnBootEnabled(): Boolean = try { Class.forName("org.eclipse.jetty.alpn.ALPN", true, null) true } catch (cnfe: ClassNotFoundException) { false } val isCorrettoSupported: Boolean = try { // Trigger an early exception over a fatal error, prefer a RuntimeException over Error.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 15.3K bytes - Viewed (1) -
android/guava-tests/test/com/google/common/collect/RangeTest.java
assertFalse(range.hasLowerBound()); try { range.lowerEndpoint(); fail(); } catch (IllegalStateException expected) { } try { range.lowerBoundType(); fail(); } catch (IllegalStateException expected) { } } private static void assertUnboundedAbove(Range<Integer> range) { assertFalse(range.hasUpperBound()); try { range.upperEndpoint();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 23.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/ResourcesTest.java
URL baseUrl = tempFile.getParentFile().toURI().toURL(); URLClassLoader loader = new URLClassLoader(new URL[] {baseUrl}); ClassLoader oldContextLoader = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(loader); URL url = Resources.getResource(tempFile.getName()); String text = Resources.toString(url, UTF_8);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 6.8K bytes - Viewed (0) -
src/test/java/jcifs/tests/BaseCIFSTest.java
try ( SmbFile defaultShareRoot = getDefaultShareRoot() ) { SmbFile f = new SmbFile(defaultShareRoot, makeRandomName()); f.createNewFile(); return f; } } protected SmbFile createTestDirectory () throws MalformedURLException, UnknownHostException, CIFSException { try ( SmbFile defaultShareRoot = getDefaultShareRoot() ) {
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 8.1K bytes - Viewed (0) -
internal/lsync/lrwmutex.go
const ( lockRetryInterval = 50 * time.Millisecond ) // lockLoop will acquire either a read or a write lock // // The call will block until the lock is granted using a built-in // timing randomized back-off algorithm to try again until successful func (lm *LRWMutex) lockLoop(ctx context.Context, id, source string, timeout time.Duration, isWriteLock bool) (locked bool) { r := rand.New(rand.NewSource(time.Now().UnixNano()))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 4.8K bytes - Viewed (0) -
src/main/java/org/codelibs/core/concurrent/CommonPoolUtil.java
final ClassLoader orignal = currentThread.getContextClassLoader(); currentThread.setContextClassLoader(CommonPoolUtil.class.getClassLoader()); try { task.run(); } catch (final Exception e) { logger.error("Uncaught exception from " + task, e); } finally { currentThread.setContextClassLoader(orignal);
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 1.5K bytes - Viewed (0)