Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 721 for Withrow (0.2 sec)

  1. android/guava-tests/test/com/google/common/io/CloserTest.java

        TestCloseable c2 = closer.register(TestCloseable.normal());
    
        IOException exception = new IOException();
    
        try {
          try {
            throw exception;
          } catch (Throwable e) {
            throw closer.rethrow(e);
          } finally {
            closer.close();
          }
        } catch (Throwable expected) {
          assertSame(exception, expected);
        }
    
        assertTrue(c1.isClosed());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/CloserTest.java

        TestCloseable c2 = closer.register(TestCloseable.normal());
    
        IOException exception = new IOException();
    
        try {
          try {
            throw exception;
          } catch (Throwable e) {
            throw closer.rethrow(e);
          } finally {
            closer.close();
          }
        } catch (Throwable expected) {
          assertSame(exception, expected);
        }
    
        assertTrue(c1.isClosed());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/Closer.java

     *   // do stuff
     * } catch (Throwable e) {
     *   // ensure that any checked exception types other than IOException that could be thrown are
     *   // provided here, e.g. throw closer.rethrow(e, CheckedException.class);
     *   throw closer.rethrow(e);
     * } finally {
     *   closer.close();
     * }
     * }</pre>
     *
     * <p>Note that this try-catch-finally block is not equivalent to a try-catch-finally block using
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  4. maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java

                        new ProjectExecutionEvent(session, currentProject, t));
    
                // rethrow original errors and runtime exceptions
                if (t instanceof RuntimeException) {
                    throw (RuntimeException) t;
                }
                if (t instanceof Error) {
                    throw (Error) t;
                }
            } finally {
                session.setCurrentProject(null);
    
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Wed Feb 28 23:31:09 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

    import static java.util.concurrent.Executors.newSingleThreadExecutor;
    import static java.util.concurrent.TimeUnit.SECONDS;
    import static org.junit.Assert.assertThrows;
    import static org.mockito.Mockito.doThrow;
    import static org.mockito.Mockito.timeout;
    import static org.mockito.Mockito.verify;
    
    import com.google.common.collect.ImmutableList;
    import com.google.common.reflect.Reflection;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

    import static java.util.concurrent.Executors.newSingleThreadExecutor;
    import static java.util.concurrent.TimeUnit.SECONDS;
    import static org.junit.Assert.assertThrows;
    import static org.mockito.Mockito.doThrow;
    import static org.mockito.Mockito.timeout;
    import static org.mockito.Mockito.verify;
    
    import com.google.common.collect.ImmutableList;
    import com.google.common.reflect.Reflection;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 74.7K bytes
    - Viewed (0)
  7. .cm/plugins/filters/byCodeowner/ignore/index.js

    const throwError = (message, Ctor) => {
        throw new Ctor(message)
    }
    
    const checkPath = (path, originalPath, doThrow) => {
        if (!isString(path)) {
            return doThrow(
                `path must be a string, but got \`${originalPath}\``,
                TypeError
            )
        }
    
        // We don't know if we should ignore EMPTY, so throw
        if (!path) {
            return doThrow(`path must not be empty`, TypeError)
        }
    JavaScript
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Fri Apr 12 13:42:16 GMT 2024
    - 17.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/StreamsTest.java

        RuntimeException exception3 = new ArithmeticException("exception from stream 3");
        Stream<String> stream1 = Stream.of("foo", "bar").onClose(doThrow(exception1));
        Stream<String> stream2 = Stream.of("baz", "buh").onClose(doThrow(exception2));
        Stream<String> stream3 = Stream.of("quux").onClose(doThrow(exception3));
        RuntimeException exception = null;
        try (Stream<String> concatenated = Streams.concat(stream1, stream2, stream3)) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 20K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/Files.java

            return ByteStreams.toByteArray(in, in.getChannel().size());
          } catch (Throwable e) {
            throw closer.rethrow(e);
          } finally {
            closer.close();
          }
        }
    
        @Override
        public String toString() {
          return "Files.asByteSource(" + file + ")";
        }
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  10. maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java

                                .inputStream(is)
                                .build());
                    } catch (XmlReaderException ne) {
                        // still unreadable even in non-strict mode, rethrow original error
                        throw e;
                    }
    
                    Severity severity = request.isProjectBuild() ? Severity.ERROR : Severity.WARNING;
                    problems.add(
                            severity,
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri May 03 08:48:38 GMT 2024
    - 61.5K bytes
    - Viewed (0)
Back to top