- Sort Score
- Num 10 results
- Language All
Results 341 - 350 of 1,279 for try (0.01 seconds)
-
docs_src/dependencies/tutorial008b_py39.py
"portal-gun": {"description": "Gun to create portals", "owner": "Rick"}, } class OwnerError(Exception): pass def get_username(): try: yield "Rick" except OwnerError as e: raise HTTPException(status_code=400, detail=f"Owner error: {e}") @app.get("/items/{item_id}")Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 735 bytes - Click Count (0) -
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/PlexusContainerCapsuleFactory.java
extension.entry().getClassRealm(), new AbstractModule() { @Override protected void configure() { try { container .lookup(Injector.class) .discover(extension.entry().getClassRealm());
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Thu Jul 03 14:18:26 GMT 2025 - 14.3K bytes - Click Count (0) -
build-logic-commons/gradle-plugin/src/main/kotlin/gradlebuild/testcleanup/TestFilesCleanupService.kt
parameters.projectStates.get() .filter { projectPathToLeftoverFiles.containsKey(it.key) } .forEach { (projectPath: String, projectExtension: TestFilesCleanupProjectState) -> try { projectExtension.verifyTestFilesCleanup(projectPath, projectPathToLeftoverFiles.getValue(projectPath)) } catch (e: Exception) { exceptions.add(e) }
Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Wed Nov 05 11:43:49 GMT 2025 - 12.5K bytes - Click Count (1) -
android/guava-testlib/src/com/google/common/testing/Platform.java
/** Serializes and deserializes the specified object. */ @SuppressWarnings("unchecked") static <T> T reserialize(T object) { checkNotNull(object); ByteArrayOutputStream bytes = new ByteArrayOutputStream(); try { ObjectOutputStream out = new ObjectOutputStream(bytes); out.writeObject(object); ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()));Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 1.7K bytes - Click Count (0) -
samples/guide/src/main/java/okhttp3/recipes/AccessHeaders.java
.header("User-Agent", "OkHttp Headers.java") .addHeader("Accept", "application/json; q=0.5") .addHeader("Accept", "application/vnd.github.v3+json") .build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); System.out.println("Server: " + response.header("Server"));
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sun May 22 01:29:42 GMT 2016 - 1.6K bytes - Click Count (0) -
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvn/MavenContext.java
} public SimplexTransferListener simplexTransferListener; public Maven maven; @Override public void doCloseContainer() throws Exception { try { super.doCloseContainer(); } finally { maven = null; } } @Override public MavenOptions options() { return (MavenOptions) super.options(); }Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Thu Sep 11 17:20:46 GMT 2025 - 1.7K bytes - Click Count (0) -
build-logic/kotlin-dsl-shared-runtime/src/main/kotlin/org/gradle/kotlin/dsl/internal/sharedruntime/codegen/PluginEntry.kt
import java.util.jar.JarEntry import java.util.jar.JarFile data class PluginEntry(val pluginId: String, val implementationClass: String) fun pluginEntriesFrom(jar: File): List<PluginEntry> = try { JarFile(jar, false).use { jarFile -> jarFile.entries().asSequence().filter { isGradlePluginPropertiesFile(it) }.map { pluginEntry ->
Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Fri Jun 28 08:29:28 GMT 2024 - 1.8K bytes - Click Count (0) -
docs_src/custom_request_and_route/tutorial002_an_py310.py
def get_route_handler(self) -> Callable: original_route_handler = super().get_route_handler() async def custom_route_handler(request: Request) -> Response: try: return await original_route_handler(request) except RequestValidationError as exc: body = await request.body() detail = {"errors": exc.errors(), "body": body.decode()}
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 974 bytes - Click Count (0) -
guava-testlib/src/com/google/common/collect/testing/testers/MapComputeIfAbsentTester.java
})); expectUnchanged(); } @MapFeature.Require(absent = SUPPORTS_PUT) @CollectionSize.Require(absent = ZERO) public void testComputeIfAbsent_unsupportedPresentExistingValue() { try { assertEquals( "computeIfAbsent(present, returnsCurrentValue) should return present or throw", v0(), getMap() .computeIfAbsent( k0(),Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Nov 14 23:40:07 GMT 2024 - 6.7K bytes - Click Count (0) -
okhttp-java-net-cookiejar/src/main/kotlin/okhttp3/java/net/cookiejar/JavaNetCookieJar.kt
} val multimap = mapOf("Set-Cookie" to cookieStrings) try { cookieHandler.put(url.toUri(), multimap) } catch (e: IOException) { Platform.get().log("Saving cookies failed for " + url.resolve("/...")!!, WARN, e) } } override fun loadForRequest(url: HttpUrl): List<Cookie> { val cookieHeaders = try { // The RI passes all headers. We don't have 'em, so we don't pass 'em!Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sat May 10 11:15:14 GMT 2025 - 3.8K bytes - Click Count (0)