From: Larry Stone <lcs@mi...> - 2006-04-20 20:40:13
> Larry Stone wrote:
> > I've noticed recurring questions like the one below, where a DSpace
> > administrator makes changes to the input-forms.xml configuration file
> > and the first indication of a problem is "Internal server error".
> > It wouldn't be too hard to add enough detail (the text of the XML parser's
> > exception usually explains what is wrong with the file). The major effort
> > is in modifying or adding JSPs to channel the extra information out to the
> > user.
> > I'm willing to file a bug report and even contemplate working on a fix
> > if there would be support for it -- so what do you think? Would a
> > change to add a better explanation to the Web UI's error page for
> > a failure parsing input-forms.xml be accepted?
> This is a good idea. The current error page ought to include stack
> traces in HTML comments, but the mechanism seems to be a little flaky,
> and extra information is a good idea. What did you have in mind?
First, it would take a little refactoring, because right now the XML is
parsed at init time so there isn't any way to get the error back;
SubmitServlet would have to explicitly call a one-time init method to
create the DCInputsReader and then catch a parse error.
Since the "internal error" servlet hides details, it would either have
to recognize parse errors and let out some details, or I'd have to
add a "parse error" servlet to let the user see some details of an
XML parse error. This could be a good thing, anyway, as we add more
XML-driven objects to the DSpace internals; there are more opportunities
for "internal" errors that are much easier to diagnose if the UI
shows what XML file it came from.
The stack-trace-in-comment code looks like it should work, but wouldn't
do any good in this case as it stands anyway. However, I've looked for
the stack trace before and not found it, so it is flaky.