Comment From: philwebb
I still can't find a way around this :(
Comment From: philwebb
Could be an STS/IntelliJ feature. Leaving open to check.
Comment From: wilkinsona
I believe jdb can be configured to ignore certain uncaught exceptions. For example:
ignore uncaught org.springframework.boot.devtools.restart.SilentExceptionHandler.SilentExitException
I wonder if it would be possible for STS and IDEA to set this automatically when they're debugging a Spring Boot app that's using Dev Tools?
/cc @martinlippert @yanncebron
Comment From: martinlippert
@wilkinsona Yepp, makes sense, good idea. Added a tracker item for this for one of our next sprints.
Comment From: gerbsen
where would I configure this in eclipse?
Comment From: wilkinsona
@gerbsen In theory, I think you should be able to use the Java Exception Breakpoint UI that can be accessed by clicking the J! icon in the Breakpoints view. However, I've never managed to get it to work. I suspect I haven't managed to find the right combination of settings in the UI that maps onto the correct call to jdb.
However, what does work is disabling "Suspend execution on uncaught exceptions". You can find that option in Preferences -> Java -> Debug. It's not as fine-grained as I would like (it applies to all exceptions and not just SilentExitException
), but you may consider it to be better than nothing.
Comment From: martinlippert
We added a preference to automatically ignore this exception when running an app in STS as Spring Boot app. This will be available as part of the upcoming STS 3.7.3 release.
Comment From: wilkinsona
Awesome! Thanks, @martinlippert .
Comment From: philwebb
I don't think there's much else we can do other than have tools detect the exception.
Comment From: hypogealgaol
sorry, was this fixed? or do I need to configure my IDE (not using STS) to do this or something
Comment From: wilkinsona
@sinjihn If you are not using STS, you'll have to configure your IDE's debugger to ignore the uncaught exception
Comment From: vladgon
Please, Make it at least public class so it can be examined and ignored in the catch block. As of now the only way to skip it is to check for
e.getMesage()==null
Thanks
Comment From: wilkinsona
@vladgon This issue is closed. Furthermore, STS automatically configures the debugger to ignore the exception without it being public. If you still believe it needs to be public, please open a new issue explaining why that's the case.
Comment From: hocine15
This issue is still present with Eclipse version 2020-03 (4.15.0) & spring-boot 2.3.0
Comment From: wilkinsona
@hocine15 You’ll need to install the Spring tools in Eclipse for the exception to be ignored automatically. If you’ve done that and it still isn’t being ignored, please open a Spring tools issue with details of how to reproduce the problem.