Search Options

Results per page
Sort
Preferred Languages
Advance

Results 741 - 750 of 1,808 for try (0.01 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/ResponseBody.kt

     *
     * For synchronous calls, the easiest way to make sure a response body is closed is with a `try`
     * block. With this structure the compiler inserts an implicit `finally` clause that calls
     * [close()][Response.close] for you.
     *
     * ```java
     * Call call = client.newCall(request);
     * try (Response response = call.execute()) {
     * ... // Use the response.
     * }
     * ```
     *
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 14:51:25 UTC 2025
    - 11.6K bytes
    - Viewed (0)
  2. guava-testlib/test/com/google/common/testing/anotherpackage/ForwardingWrapperTesterTest.java

      }
    
      private <T> void assertFailure(
          Class<T> interfaceType,
          Function<T, ? extends T> wrapperFunction,
          String... expectedMessages) {
        try {
          tester.testForwarding(interfaceType, wrapperFunction);
        } catch (AssertionFailedError expected) {
          for (String message : expectedMessages) {
            assertThat(expected).hasMessageThat().contains(message);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 15.7K bytes
    - Viewed (0)
  3. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

        server.setDispatcher(this);
        server.start(port);
      }
    
      @Override public MockResponse dispatch(RecordedRequest request) {
        String path = request.getPath();
        try {
          if (!path.startsWith("/") || path.contains("..")) throw new FileNotFoundException();
    
          File file = new File(root + path);
          return file.isDirectory()
              ? directoryToResponse(path, file)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jan 02 02:50:44 UTC 2019
    - 4.7K bytes
    - Viewed (0)
  4. compat/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java

                expressionDocumentation = new HashMap<>();
    
                ClassLoader docLoader = initializeDocLoader();
    
                for (String root : EXPRESSION_ROOTS) {
                    try (InputStream docStream =
                            docLoader.getResourceAsStream(EXPRESSION_DOCO_ROOTPATH + root + ".paramdoc.xml")) {
                        if (docStream != null) {
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  5. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/internal/IsProbablyUtf8.kt

     * sample of code points to detect unicode control characters commonly used in binary file
     * signatures.
     */
    fun Buffer.isProbablyUtf8(): Boolean {
      try {
        val prefix = Buffer()
        val byteCount = size.coerceAtMost(64)
        copyTo(prefix, 0, byteCount)
        for (i in 0 until 16) {
          if (prefix.exhausted()) {
            break
          }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Jan 07 16:05:34 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  6. regression-test/src/androidTest/java/okhttp/regression/compare/OkHttpClientTest.java

      @Test public void get() throws IOException {
        OkHttpClient client = new OkHttpClient();
        Request request = new Request.Builder()
            .url("https://google.com/robots.txt")
            .build();
        try (Response response = client.newCall(request).execute()) {
          assertEquals(200, response.code());
          assertEquals(Protocol.HTTP_2, response.protocol());
        }
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Nov 14 17:38:22 UTC 2020
    - 1.4K bytes
    - Viewed (0)
  7. src/test/java/org/codelibs/fess/filter/WebApiFilterTest.java

                    return webApiManager;
                }
            };
            ComponentUtil.register(factory, "webApiManagerFactory");
    
            // Execute and expect IOException
            try {
                webApiFilter.doFilter(request, response, chain);
                fail("Expected IOException");
            } catch (IOException e) {
                assertEquals("Test IOException", e.getMessage());
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 26.2K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    /// tip
    
    You can use `async` or regular functions.
    
    **FastAPI** will do the right thing with each, the same as with normal dependencies.
    
    ///
    
    ## A dependency with `yield` and `try` { #a-dependency-with-yield-and-try }
    
    If you use a `try` block in a dependency with `yield`, you'll receive any exception that was thrown when using the dependency.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/fess/exception/CommandExecutionExceptionTest.java

        }
    
        public void test_exceptionThrown() {
            // Test that the exception can be thrown and caught properly
            String expectedMessage = "Command execution error occurred";
    
            try {
                throw new CommandExecutionException(expectedMessage);
            } catch (CommandExecutionException e) {
                assertEquals(expectedMessage, e.getMessage());
                assertNull(e.getCause());
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 9.2K bytes
    - Viewed (0)
  10. fess-crawler/src/main/java/org/codelibs/fess/crawler/helper/RobotsTxtHelper.java

         */
        public RobotsTxt parse(final InputStream stream, final String charsetName) {
            if (!enabled) {
                return null;
            }
    
            try {
                @SuppressWarnings("resource")
                final BufferedReader reader = new BufferedReader(new InputStreamReader(new BOMInputStream(stream), charsetName));
    
                String line;
    Registered: Sun Sep 21 03:50:09 UTC 2025
    - Last Modified: Sun Jul 06 02:13:03 UTC 2025
    - 7.7K bytes
    - Viewed (0)
Back to top