Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 21 - 30 of 2,310 for rethrow (0.07 seconds)

  1. guava-tests/test/com/google/common/reflect/ClassPathTest.java

            jarOut.putNextEntry(new ZipEntry(entry));
            Resources.copy(ClassPathTest.class.getResource(entry), jarOut);
            jarOut.closeEntry();
          }
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      private static Manifest manifest(String content) throws IOException {
        InputStream in = new ByteArrayInputStream(content.getBytes(US_ASCII));
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 25.8K bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/io/FlushablesTest.java

      }
    
      // Set up a flushable to expect to be flushed, and optionally to
      // throw an exception.
      private void setupFlushable(boolean shouldThrowOnFlush) throws IOException {
        mockFlushable = mock(Flushable.class);
        if (shouldThrowOnFlush) {
          doThrow(new IOException("This should only appear in the logs. It should not be rethrown."))
              .when(mockFlushable)
              .flush();
        }
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Jul 16 20:34:52 GMT 2025
    - 3.3K bytes
    - Click Count (0)
  3. android/guava-tests/test/com/google/common/io/FlushablesTest.java

      }
    
      // Set up a flushable to expect to be flushed, and optionally to
      // throw an exception.
      private void setupFlushable(boolean shouldThrowOnFlush) throws IOException {
        mockFlushable = mock(Flushable.class);
        if (shouldThrowOnFlush) {
          doThrow(new IOException("This should only appear in the logs. It should not be rethrown."))
              .when(mockFlushable)
              .flush();
        }
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Jul 16 20:34:52 GMT 2025
    - 3.3K bytes
    - Click Count (0)
  4. src/test/java/jcifs/smb/SmbTreeConnectionTraceTest.java

            assertTrue(ex.getMessage() != null && ex.getMessage().contains("Failed to connect to server"));
            assertSame(thrown, ex.getCause());
        }
    
        @Test
        @DisplayName("connectWrapException: rethrows SmbException unchanged")
        void connectWrapException_rethrowsSmbException() throws Exception {
            // Arrange
            CIFSContext ctx = mock(CIFSContext.class);
            SmbResourceLocatorImpl loc = newLocator(ctx);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 8.7K bytes
    - Click Count (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

        if (t != null) {
          if (t instanceof Error) {
            throw (Error) t;
          } else if (t instanceof RuntimeException) {
            throw (RuntimeException) t;
          } else if (t instanceof Exception) {
            throw (Exception) t;
          } else {
            AssertionFailedError afe = new AssertionFailedError(t.toString());
            afe.initCause(t);
            throw afe;
          }
        }
    
        if (Thread.interrupted()) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Mar 07 02:20:33 GMT 2026
    - 8.8K bytes
    - Click Count (0)
  6. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

        if (t != null) {
          if (t instanceof Error) {
            throw (Error) t;
          } else if (t instanceof RuntimeException) {
            throw (RuntimeException) t;
          } else if (t instanceof Exception) {
            throw (Exception) t;
          } else {
            AssertionFailedError afe = new AssertionFailedError(t.toString());
            afe.initCause(t);
            throw afe;
          }
        }
    
        if (Thread.interrupted()) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Mar 07 02:20:33 GMT 2026
    - 8.8K bytes
    - Click Count (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilJvm.kt

      try {
        close()
      } catch (e: AssertionError) {
        throw e
      } catch (rethrown: RuntimeException) {
        if (rethrown.message == "bio == null") {
          // Conscrypt in Android 10 and 11 may throw closing an SSLSocket. This is safe to ignore.
          // https://issuetracker.google.com/issues/177450597
          return
        }
        throw rethrown
      } catch (_: Exception) {
      }
    }
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 10.3K bytes
    - Click Count (1)
  8. src/test/java/jcifs/dcerpc/DcerpcSecurityProviderTest.java

            verify(dcerpcSecurityProvider, times(1)).wrap(mockNdrBuffer);
        }
    
        @Test
        void testWrapMethodThrowsDcerpcException() throws DcerpcException {
            // Configure the mock to throw DcerpcException when wrap is called
            doThrow(new DcerpcException("Test wrap exception")).when(dcerpcSecurityProvider).wrap(mockNdrBuffer);
    
            // Assert that calling wrap throws DcerpcException
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 2.5K bytes
    - Click Count (0)
  9. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

          checkNotNull(s); // ok to throw NPE?
        }
      }
    
      public void testPassTwoNullableArgsFirstThrowsNpe() {
        shouldPass(new PassTwoNullableArgsFirstThrowsNpe());
      }
    
      private static class PassTwoNullableArgsFirstThrowsOther extends PassObject {
        @Override
        public void twoNullableArgs(@Nullable String s, @Nullable Integer i) {
          doThrow(s); // ok to throw non-NPE exception for null s
        }
      }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 47.9K bytes
    - Click Count (0)
  10. src/test/java/jcifs/smb/SmbTransportInternalTest.java

            verify(transport).isSigningEnforced();
        }
    
        // Error propagation: signing checks may throw SmbException
        @Test
        @DisplayName("signing checks propagate SmbException")
        void signingChecks_throw() throws Exception {
            doThrow(new SmbException("opt error")).when(transport).isSigningOptional();
            doThrow(new SmbException("enf error")).when(transport).isSigningEnforced();
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 07:14:38 GMT 2025
    - 12.1K bytes
    - Click Count (0)
Back to Top