I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 5d0b35d5 authored by zzz's avatar zzz
Browse files

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

parent 8c71b883
Branches
Tags
No related merge requests found
......@@ -386,7 +386,7 @@ public class ConfigClientsHandler extends FormHandler {
WebAppStarter.startWebApp(_context, s, app, path.getAbsolutePath());
addFormNoticeNoEscape(_t("WebApp") + " <a href=\"/" + app + "/\">" + _t(app) + "</a> " + _t("started") + '.');
} catch (Throwable e) {
addFormError(_t("Failed to start") + ' ' + _t(app) + " " + e + '.');
addFormError(_t("Failed to start") + ' ' + _t(app) + ": " + e);
_log.error("Failed to start webapp " + app, e);
}
return;
......
......@@ -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();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment