AspectMap – Part 2 – An Exception Handling Helper

added by csurfleet
6/7/2012 7:53:33 AM

6 Kicks, 384 Views

Welcome back to my series on using AspectMap. In this post I’ll walk you through the setup of a generic exception handler which can be assigned to any code you like with the addition of a single attribute.


6/7/2012 8:43:29 AM
Another great use of AOP, and all without having to pay for Postsharp ;-)

6/7/2012 9:12:29 AM
PostSharp Starter Edition is free, even for commercial use.

6/7/2012 9:15:11 AM
Ah, I didn't know that. What it looks like you miss out on though is the optimization, I believe there's a lot of extra boilerplate code added to each method without it (making it comparable, performance-wise, to this solution).

6/7/2012 9:18:15 AM
I would say that the runtime performance hit from Castle DynamicProxy more than compensates. It would be interesting to see benchmarks, but I'm guessing 99 times out of 100, the AOP tool isn't going to be the performance bottleneck of your system.

6/7/2012 9:25:28 AM
I've got started on some caching stuff for AspectMap and I'll be load testing a few different scenarios. I'll make it public when its done, although its not top of the list right now until I finish the tutorials off.