If the main class throws an exception,When RestartLauncher run it will throw a InvocationTargetException,So I'm going to ignore it. Fixes #26894
Comment From: pivotal-cla
@crystalcd Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
Comment From: pivotal-cla
@crystalcd Thank you for signing the Contributor License Agreement!
Comment From: wilkinsona
Thanks for the proposal. Unfortunately, ignoring the exception isn't the right thing to do. The intention is that a restart that fails due to an application context refresh failure will be retried once the user has made a change to the application. This retry is triggered by FileWatchingFailureHandler.handle(Throwable)
. If the InvocationTargetException
is ignored entirely, an application using Devtools won't recover from a restart failure caused by an application context refresh failure and the JVM will exit instead.