tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deacon Marcus" <>
Subject RuntimeException handling in WebApp initialization
Date Sun, 26 Aug 2001 09:39:59 GMT
I noticed when a Filter (probably pre-loaded Servlets too) throws
RuntimeException it's logged, but not displayed, and then it makes an WebApp
entirely unavailable (503 error). While not display an error summarizing
exception name, message, optionally stack trace in stdout? Normally (Tomcat
running as a deamon) stdout is ignored, but if such info would be displayed
it would speed up error tracing in development environment. Looks like it
could be easily fixed by a small addition between lines 3000-3100 in
StandardContext, at least for filters.

Something like displaying:
Starting Tomcat...
Exception while initializing Filter for context "hostname":
Exception name: RuntimeException
Exception msg: error reading xml configuration from file
WebApp "hostname" unavailable because of errors in Listeners initializers.

I'd say stack trace isn't necessary here because it's availabe in logs, and
writing in would probably scroll exception name and message off-screen (not
all environments have scrolling on command line) which would defeat its
purpose on making this info available instantly.

Greetings, deacon Marcus

p.s. I'm using Tomcat 4.0 b6

View raw message