You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Steve Loughran <st...@iseran.com> on 2003/01/16 20:11:05 UTC

fault logging

I fear we (I) may have cranked back too far on fault logging

the current state is

AxisFaults are logged at debug
Exceptions in Axis logged at info

This is all well and good for hiding faults deliberately thrown by the app.

but now imagine a Service, call it 'S', as in 'Steves broken service', which
throws an NPE on account of my apparent incompetence.  What happens?

Answer: it gets caught somewhere and turned into an AxisFault. which then
only gets logged at the debug level, not info, even though it is a symptom
of bad code.

I'd like to propose that (somehow) RuntimeExceptions thrown by invoked
methods are treated as special and logged at a higher level server side than
those exceptions that are in the signature of the soapaction methods.

How do you think I should approach this?

(a) change AxisFault.makeFault to recognise RuntimeExceptions specially &
mark them; have the error reporting code in the Servlet react to the
different states

(b) change try/catch in JavaProvider to do stuff differently & mark them
there (lets service code create AxisFaults from exceptions without any
change); have the error reporting code in the Servlet react to the different
states

(c) Look at the faultstring and try and make sense of it in the Servlet.
This doesnt work well with subclasses 'cept through excessive introspection.

thoughts, opinions, votes?

I am minded towards (a) or (b), with a bit of a bias towards (b), as its
only RT exceptions that make it out the invocation that are special.