Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report stacktraces on Shamrock boot error #39

Merged
merged 1 commit into from
Oct 1, 2018
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void testStarted(Description description) {
runtimeRunner.run();
} catch (RuntimeException e) {
failed = true;
throw e;
throw new RuntimeException("Failed to boot Shamrock during @ShamrockTest runner!", e);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,23 @@ public void addServletContextParameter(@ContextObject("deploymentInfo") Deployme

public void startUndertow(StartupContext startupContext, @ContextObject("servletHandler") HttpHandler handler, String port) throws ServletException {
if (undertow == null) {
log.log(Level.INFO, "Starting Undertow on port " + port);
undertow = Undertow.builder()
.addHttpListener(Integer.parseInt(port), "localhost")
.setHandler(new CanonicalPathHandler(ROOT_HANDLER))
.build();
undertow.start();
try {
log.log(Level.INFO, "Starting Undertow on port " + port);
undertow = Undertow.builder()
.addHttpListener(Integer.parseInt(port), "localhost")
.setHandler(new CanonicalPathHandler(ROOT_HANDLER))
.build();
undertow.start();
}
catch (Exception e) {
log.log(Level.SEVERE, "Failed to start Undertow", e);
}
}
currentRoot = handler;
// startupContext.addCloseable(new Closeable() {
// @Override
// public void close() throws IOException {
// val.stop();
// undertow.stop();
// }
// });
}
Expand Down