Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for dispatchFailed (0.17 sec)

  1. platforms/core-runtime/messaging/src/test/groovy/org/gradle/internal/dispatch/ExceptionTrackingFailureHandlerTest.groovy

            RuntimeException failure2 = new RuntimeException('broken2')
    
            when:
            dispatch.dispatchFailed("message1", failure1)
            dispatch.dispatchFailed("message2", failure2)
            dispatch.stop()
    
            then:
            def e = thrown(DispatchException)
            e.cause == failure1
            1 * logger.error('broken2', failure2)
            0 * logger._
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:59:22 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  2. platforms/core-runtime/messaging/src/test/groovy/org/gradle/internal/dispatch/FailureHandlingDispatchTest.groovy

            def failure = new RuntimeException()
    
            when:
            dispatch.dispatch("message")
    
            then:
            1 * target.dispatch("message") >> { throw failure }
            1 * handler.dispatchFailed("message", failure)
        }
    
        def "propagates exception thrown by handler"() {
            def failure = new RuntimeException()
            def adaptedFailure = new RuntimeException()
    
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:59:22 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  3. platforms/core-runtime/messaging/src/main/java/org/gradle/internal/dispatch/DispatchFailureHandler.java

    public interface DispatchFailureHandler<T> {
        /**
         * Called when a message could not be dispatched. This method can throw an exception to abort further dispatching.
         */
        void dispatchFailed(T message, Throwable failure);
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:59:22 UTC 2023
    - 892 bytes
    - Viewed (0)
  4. platforms/core-runtime/messaging/src/main/java/org/gradle/internal/dispatch/FailureHandlingDispatch.java

            this.handler = handler;
        }
    
        @Override
        public void dispatch(T message) {
            try {
                dispatch.dispatch(message);
            } catch (Throwable throwable) {
                handler.dispatchFailed(message, throwable);
            }
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:59:22 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  5. platforms/core-runtime/messaging/src/main/java/org/gradle/internal/dispatch/ExceptionTrackingFailureHandler.java

        private final Logger logger;
        private DispatchException failure;
    
        public ExceptionTrackingFailureHandler(Logger logger) {
            this.logger = logger;
        }
    
        @Override
        public void dispatchFailed(Object message, Throwable failure) {
            if (this.failure != null && !Thread.currentThread().isInterrupted()) {
                logger.error(failure.getMessage(), failure);
            } else {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:59:22 UTC 2023
    - 1.6K bytes
    - Viewed (0)
Back to top