Skip to content

Commit

Permalink
Merge pull request wildfly#17611 from kevinferrare/bugfix/WFLY-19019
Browse files Browse the repository at this point in the history
WFLY-19019: Do not hide exceptions of failed deployments in case undeploy also failed
  • Loading branch information
bstansberry committed Feb 13, 2024
2 parents 367b097 + c4f52eb commit 4e88faf
Showing 1 changed file with 8 additions and 4 deletions.
Expand Up @@ -89,10 +89,14 @@ public void startContext() throws ServletException {
HttpHandler handler = deploymentManager.start();
Deployment deployment = deploymentManager.getDeployment();
host.get().registerDeployment(deployment, handler);
} catch (Throwable e ) {
deploymentManager.undeploy();
container.get().getServletContainer().removeDeployment(deploymentInfo);
throw e;
} catch (Throwable originalException) {
try {
deploymentManager.undeploy();
container.get().getServletContainer().removeDeployment(deploymentInfo);
} catch(Throwable e) {
originalException.addSuppressed(e);
}
throw originalException;
} finally {
StartupContext.setInjectionContainer(null);
}
Expand Down

0 comments on commit 4e88faf

Please sign in to comment.