question: public void testHandle_sourceFailedActionFailed ( ) { for ( boolean createIncomplete : new boolean [ ] { true , false } ) for ( ExecutionMode m : ExecutionMode . values ( ) ) { final AtomicInteger a = new AtomicInteger ( 0 ) ; final CFException ex1 = new CFException ( ) ; final CFException ex2 = new CFException ( ) ; final CompletableFuture < Integer > f = new CompletableFuture < > ( ) ; if ( ! createIncomplete ) f . completeExceptionally ( ex1 ) ; final CompletableFuture < Integer > g = m . handle ( f , null ) ; if ( createIncomplete ) f . completeExceptionally ( ex1 ) ; checkCompletedWithWrappedException ( g , ex2 ) ; checkCompletedExceptionally ( f , ex1 ) ; assertEquals ( 1 , a . get ( ) ) ; } }
target:  If a "handle action" throws an exception when triggered by a source completion that also throws an exception, the action exception takes precedence (unlike whenComplete)