Menu

#55 Exception propagation in RequestFilter

open
nobody
WCF (1)
5
2009-03-13
2009-03-13
Anonymous
No

The WCF RequestFilter catchs all Throwable exceptions and writes an HTML with the error stack trace.
To coexist with other applications, the exception should be throwed to be controlled or redirected to an error page.
I think that the "catch" block in "doFilter" method could be:

} catch (ServletException e) {
// throws it
throw e;
} catch (IOException e) {
// throws it
throw e;
} catch (Exception e) {
// encapsulate and throws it
throw new ServletException(e);
} finally {
context.invalidate();
}

Discussion


Log in to post a comment.