Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for addSuppressed (0.12 sec)

  1. android/guava/src/com/google/common/io/Closer.java

       * addSuppressed(Throwable) mechanism.
       */
      private static final Suppressor SUPPRESSING_SUPPRESSOR =
          (closeable, thrown, suppressed) -> {
            // ensure no exceptions from addSuppressed
            if (thrown == suppressed) {
              return;
            }
            try {
              thrown.addSuppressed(suppressed);
            } catch (Throwable e) {
              /*
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  2. guava/src/com/google/common/io/Closer.java

       * addSuppressed(Throwable) mechanism.
       */
      private static final Suppressor SUPPRESSING_SUPPRESSOR =
          (closeable, thrown, suppressed) -> {
            // ensure no exceptions from addSuppressed
            if (thrown == suppressed) {
              return;
            }
            try {
              thrown.addSuppressed(suppressed);
            } catch (Throwable e) {
              /*
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  3. src/main/java/jcifs/util/transport/Transport.java

            catch ( IOException ioe ) {
                log.warn("sendrecv failed", ioe);
                try {
                    disconnect(true);
                }
                catch ( IOException ioe2 ) {
                    ioe.addSuppressed(ioe2);
                    log.info("disconnect failed", ioe2);
                }
                throw ioe;
            }
            catch ( InterruptedException ie ) {
                throw new TransportException(ie);
            }
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Nov 01 18:12:21 UTC 2020
    - 24.1K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/io/CloserTest.java

       */
      private void assertSuppressed(Suppression... expected) {
        assertEquals(ImmutableList.copyOf(expected), suppressor.suppressions);
      }
    
      // TODO(cpovirk): Just use addSuppressed+getSuppressed now that we can rely on it.
      /** Suppressor that records suppressions. */
      private static class TestSuppressor implements Closer.Suppressor {
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/CloserTest.java

       */
      private void assertSuppressed(Suppression... expected) {
        assertEquals(ImmutableList.copyOf(expected), suppressor.suppressions);
      }
    
      // TODO(cpovirk): Just use addSuppressed+getSuppressed now that we can rely on it.
      /** Suppressor that records suppressions. */
      private static class TestSuppressor implements Closer.Suppressor {
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  6. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

          throw failure
        }
    
        val unknownHostException = UnknownHostException(hostname)
        unknownHostException.initCause(failure)
    
        for (i in 1 until failures.size) {
          unknownHostException.addSuppressed(failures[i])
        }
    
        throw unknownHostException
      }
    
      private fun getCacheOnlyResponse(request: Request): Response? {
        if (client.cache != null) {
          try {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Oct 31 09:27:31 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

            val addresses = Dns.SYSTEM.lookup(hostname)
            listOf(addresses[0])
          }
    
        private operator fun Throwable?.plus(throwable: Throwable): Throwable {
          if (this != null) {
            addSuppressed(throwable)
            return this
          }
          return throwable
        }
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

              }
            } catch (t: Throwable) {
              cancel()
              if (!signalledCallback) {
                val canceledException = IOException("canceled due to $t")
                canceledException.addSuppressed(t)
                responseCallback.onFailure(this@RealCall, canceledException)
              }
              throw t
            } finally {
              client.dispatcher.finished(this)
            }
          }
        }
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

    internal fun <E> MutableList<E>.addIfAbsent(element: E) {
      if (!contains(element)) add(element)
    }
    
    internal fun Exception.withSuppressed(suppressed: List<Exception>): Throwable =
      apply {
        for (e in suppressed) addSuppressed(e)
      }
    
    internal inline fun <T> Iterable<T>.filterList(predicate: T.() -> Boolean): List<T> {
      var result: List<T> = emptyList()
      for (i in this) {
        if (predicate(i)) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon May 13 13:42:37 UTC 2024
    - 11K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb/SmbTreeImpl.java

                try {
                    transport.disconnect(true);
                }
                catch ( IOException e ) {
                    log.warn("Failed to disconnect transport", e);
                    se.addSuppressed(e);
                }
                throw se;
            }
        }
    
    
        /**
         * @param trans
         * @param sess
         * @throws CIFSException
         * 
         */
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Thu Jan 05 13:06:39 UTC 2023
    - 29.6K bytes
    - Viewed (0)
Back to top