Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for print_backtrace (0.21 sec)

  1. okhttp/src/test/java/okhttp3/HttpUrlTest.kt

            fail("Expected failure with $exceptionMessage but got $result")
          } else {
            fail("Expected failure but got $result")
          }
        } catch (iae: IllegalArgumentException) {
          iae.printStackTrace()
          if (exceptionMessage != null) {
            assertThat(iae).hasMessage(exceptionMessage)
          }
        }
      }
    
      @Test
      fun parseTrimsAsciiWhitespace() {
        val expected = parse("http://host/")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 67.9K bytes
    - Viewed (0)
  2. okcurl/src/main/kotlin/okhttp3/curl/internal/-MainCommon.kt

        while (!source.exhausted()) {
          out.write(source.buffer, source.buffer.size)
          out.flush()
        }
    
        response.body.close()
      } catch (e: IOException) {
        e.printStackTrace()
      } finally {
        close()
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/WebPlatformUrlTest.kt

          }
        } catch (e: Throwable) {
          if (KNOWN_FAILURES.contains(testData.toString())) {
            System.err.println("Ignoring known failure: $testData")
            e.printStackTrace()
          } else {
            throw e
          }
        }
      }
    
      private fun testHttpUrl(testData: WebPlatformUrlTestData) {
        val url =
          when (testData.base) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.7K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/WebSocketEcho.java

        webSocket.close(1000, null);
        System.out.println("CLOSE: " + code + " " + reason);
      }
    
      @Override public void onFailure(WebSocket webSocket, Throwable t, Response response) {
        t.printStackTrace();
      }
    
      public static void main(String... args) {
        new WebSocketEcho().run();
      }
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 04 11:40:21 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/kt/AsynchronousGet.kt

            .build()
    
        client.newCall(request).enqueue(
          object : Callback {
            override fun onFailure(
              call: Call,
              e: IOException,
            ) {
              e.printStackTrace()
            }
    
            override fun onResponse(
              call: Call,
              response: Response,
            ) {
              response.use {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  6. okcurl/src/main/kotlin/okhttp3/curl/logging/OneLineLogFormat.kt

        val time = Instant.ofEpochMilli(record.millis).atZone(offset)
    
        return if (record.thrown != null) {
          val sw = StringWriter(4096)
          val pw = PrintWriter(sw)
          record.thrown.printStackTrace(pw)
          String.format("%s\t%s%n%s%n", time.format(d), message, sw.toString())
        } else {
          String.format("%s\t%s%n", time.format(d), message)
        }
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  7. native-image-tests/src/main/kotlin/okhttp3/TestRegistration.kt

            // silently without rewriting the binary. So we report noisily, but keep going and prefer
            // running most tests still.
            e.printStackTrace()
          }
        }
      }
    
      private fun registerTest(
        access: Feature.BeforeAnalysisAccess,
        java: Class<*>,
      ) {
        access.registerAsUsed(java)
        RuntimeReflection.register(java)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  8. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

        for (int i = 0; i < threadCount; i++) {
          executor.execute(() -> {
            try {
              drainQueue();
            } catch (Exception e) {
              e.printStackTrace();
            }
          });
        }
        executor.shutdown();
      }
    
      private void drainQueue() throws Exception {
        for (HttpUrl url; (url = queue.take()) != null; ) {
          if (!fetchedUrls.add(url)) {
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 4.6K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/PostStreamingWithPipe.java

                Thread.sleep(10);
                sink.writeUtf8(String.format(" * %s = %s\n", i, factor(i)));
              }
              sink.close();
            } catch (IOException | InterruptedException e) {
              e.printStackTrace();
            }
          }
    
          private String factor(int n) {
            for (int i = 2; i < n; i++) {
              int x = n / i;
              if (x * i == n) return factor(x) + " × " + i;
            }
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Jul 06 03:18:15 GMT 2018
    - 3.1K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/AutobahnTester.kt

              latch.countDown()
            }
    
            override fun onFailure(
              webSocket: WebSocket,
              t: Throwable,
              response: Response?,
            ) {
              t.printStackTrace(System.out)
              latch.countDown()
            }
          },
        )
    
        check(latch.await(30, TimeUnit.SECONDS)) { "Timed out waiting for test $number to finish." }
        val endNanos = System.nanoTime()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
Back to top