Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions core/devmode/src/main/java/io/quarkus/dev/DevModeMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,6 @@ public void start() throws Exception {
if (context.isAbortOnFailedStart()) {
throw new RuntimeException(deploymentProblem == null ? compileProblem : deploymentProblem);
}
log.error("Failed to start Quarkus, attempting to start hot replacement endpoint to recover");
if (runtimeUpdatesProcessor != null) {
runtimeUpdatesProcessor.startupFailed();
}
}
Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
@Override
Expand Down Expand Up @@ -180,6 +176,20 @@ public void execute(BuildContext context) {
runner.run();
DevModeMain.runner = runner;
deploymentProblem = null;

} catch (Throwable t) {
deploymentProblem = t;
if (context.isAbortOnFailedStart() || liveReload) {
log.error("Failed to start quarkus", t);
} else {
//we need to set this here, while we still have the correct TCCL
//this is so the config is still valid, and we can read HTTP config from application.properties
log.error("Failed to start Quarkus, attempting to start hot replacement endpoint to recover");
if (runtimeUpdatesProcessor != null) {
runtimeUpdatesProcessor.startupFailed();
}
}

} finally {
Thread.currentThread().setContextClassLoader(old);
}
Expand Down