Console: Improve handling and logging of webapps that fail to start

This commit is contained in:
zzz
2016-11-04 17:02:15 +00:00
parent 8c71b883bb
commit 5d0b35d53a
2 changed files with 7 additions and 2 deletions

View File

@@ -48,7 +48,9 @@ public class WebAppStarter {
/**
* adds and starts
* Adds and starts.
* Prior to 0.9.28, was not guaranteed to throw on failure.
*
* @throws just about anything, caller would be wise to catch Throwable
*/
static void startWebApp(RouterContext ctx, ContextHandlerCollection server,
@@ -57,6 +59,9 @@ public class WebAppStarter {
WebAppContext wac = addWebApp(ctx, server, appName, warPath, tmpdir);
//_log.debug("Loading war from: " + warPath);
LocaleWebAppHandler.setInitParams(wac, INIT_PARAMS);
// default false, set to true so we get good logging,
// and the caller will know it failed
wac.setThrowUnavailableOnStartupException(true);
wac.start();
}