dlmarion commented on PR #5808:
URL: https://github.com/apache/accumulo/pull/5808#issuecomment-3201365310

   Yeah, so we should probably just catch Throwable in both cases. I added a 
test concurrent to you, the following prints both, but doesn't link them using 
the suppression mechanism.
   
   ```
   public class AbstractServerTest {
     
     private static final Logger LOG = 
LoggerFactory.getLogger(AbstractServerTest.class);
   
     public void throwError(String name) {
       throw new StackOverflowError(name);
     }
   
     public void throwException(String name) {
       throw new UnsupportedOperationException(name);
     }
     
     @Test
     public void testExceptions( ) {
       try {
         throwError("runServer");
       } catch (Throwable e) {
         System.err.println("died, exception thrown from runServer.");
         e.printStackTrace();
         LOG.error("{} died, exception thrown from runServer.", e);
         throw e;
       } finally {
         try {
           throwException("close");        
         } catch (Throwable e) {
           System.err.println("died, exception thrown from close.");  
           e.printStackTrace();
           LOG.error("{} died, exception thrown from close.", e);
           for (Throwable suppressed : e.getSuppressed()) {
             LOG.error("suppressed: ", suppressed);
           }
           throw e;
         }
       }
     }
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to