Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 284 for thrown (0.16 sec)

  1. okhttp/src/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt

    class WebSocketWriterTest {
      private val data = Buffer()
      private val random = Random(0)
    
      /**
       * Check all data as verified inside of the test. We do this in an AfterEachCallback so that
       * exceptions thrown from the test do not cause this check to fail.
       */
      @RegisterExtension
      val noDataLeftBehind =
        AfterEachCallback { context: ExtensionContext ->
          if (context.executionException.isPresent) return@AfterEachCallback
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http2/StreamResetException.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.internal.http2
    
    import java.io.IOException
    
    /** Thrown when an HTTP/2 stream is canceled without damage to the socket that carries it. */
    class StreamResetException(
      @JvmField val errorCode: ErrorCode,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 869 bytes
    - Viewed (0)
  3. okcurl/src/main/kotlin/okhttp3/curl/logging/OneLineLogFormat.kt

        val message = formatMessage(record)
    
        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 May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/test/kotlin/okhttp3/OkHttpClientTestRuleTest.kt

        val thread =
          object : Thread() {
            override fun run() {
              throw RuntimeException("boom!")
            }
          }
        thread.start()
        thread.join()
    
        assertFailsWith<AssertionError> {
          testRule.afterEach(extensionContext)
        }.also { expected ->
          assertThat(expected).hasMessage("uncaught exception thrown during test")
          assertThat(expected.cause!!).hasMessage("boom!")
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http2/ConnectionShutdownException.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.internal.http2
    
    import java.io.IOException
    
    /**
     * Thrown when an HTTP/2 connection is shutdown (either explicitly or if the peer has sent a GOAWAY
     * frame) and an attempt is made to use the connection.
     */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 875 bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/platform/android/AndroidLog.kt

          else -> Log.DEBUG
        }
    
    object AndroidLogHandler : Handler() {
      override fun publish(record: LogRecord) {
        androidLog(record.loggerName, record.androidLevel, record.message, record.thrown)
      }
    
      override fun flush() {
      }
    
      override fun close() {
      }
    }
    
    @SuppressSignatureCheck
    object AndroidLog {
      private const val MAX_LOG_LENGTH = 4000
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

            .sslSocketFactory(handshakeCertificates.sslSocketFactory())
        }
      }
    
      /** Confirm that runtime exceptions thrown inside of OkHttp propagate to the caller.  */
      @Test
      fun unexpectedExceptionSync() {
        client =
          client.newBuilder()
            .dns { hostname: String? -> throw RuntimeException("boom!") }
            .build()
        server.enqueue(MockResponse())
        assertFailsWith<RuntimeException> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketProtocol.kt

      /**
       * Value for [B1_MASK_LENGTH] which indicates the next eight bytes are the unsigned
       * length.
       */
      internal const val PAYLOAD_LONG = 127
    
      /** Used when an unchecked exception was thrown in a listener. */
      internal const val CLOSE_CLIENT_GOING_AWAY = 1001
    
      /** Used when an empty close frame was received (i.e., without a status code). */
      internal const val CLOSE_NO_STATUS_CODE = 1005
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  9. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/UnixDomainSocketFactory.java

        } catch (IOException e) {
          result.close();
          throw e;
        }
        return result;
      }
    
      @Override public Socket createSocket(
          String host, int port, InetAddress localHost, int localPort) throws IOException {
        return createSocket(host, port);
      }
    
      @Override public Socket createSocket(InetAddress host, int port) throws IOException {
        Socket result = createSocket();
    
        try {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 03 21:33:52 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

      @SuppressLint("NewApi")
      override fun afterEach(context: ExtensionContext) {
        val failure = context.executionException.orElseGet { null }
    
        if (uncaughtException != null) {
          throw failure + AssertionError("uncaught exception thrown during test", uncaughtException)
        }
    
        if (context.isFlaky()) {
          logEvents()
        }
    
        LogManager.getLogManager().reset()
    
        var result: Throwable? = failure
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
Back to top