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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s