Commit 0938a874 authored by Dave Syer's avatar Dave Syer

Ensure startup error is logged (and rethrown)

Fixes gh-948
parent 32295b9b
......@@ -324,17 +324,20 @@ public class SpringApplication {
return context;
}
catch (Exception ex) {
for (SpringApplicationRunListener runListener : runListeners) {
finishWithException(runListener, context, ex);
try {
for (SpringApplicationRunListener runListener : runListeners) {
finishWithException(runListener, context, ex);
}
this.log.error("Application startup failed", ex);
}
if (context != null) {
context.close();
finally {
if (context != null) {
context.close();
}
}
ReflectionUtils.rethrowRuntimeException(ex);
return context;
}
finally {
}
}
private Collection<SpringApplicationRunListener> getRunListeners(String[] args) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment