Spring.NET ExceptionHandlerAdvice

ExceptionHandlerAdvice is a nice way to handle exceptions as a cross-cutting concern.

With this advice you can do following to an exception:

  • log
  • translate
  • wrap
  • replace
  • return
  • swallow

I had a bit of difficulty with getting any output with the "log" and after looking at what’s happening under debuger found that the logger named LogExceptionHandler (which is what gets the log output from the advice) has to be configured with TRACE level, not DEBUG as Spring.NET documentation would have you believe.

The problem is transitional, as the Spring.NET developers are working on fully configurable log settings.

Happy Springing! 

Spring.NET ExceptionHandlerAdvice