does spring has built in aspects for exception handling? if so,
is there any documentation about exception handling with Spring AOP?
does spring has built in aspects for exception handling? if so,
is there any documentation about exception handling with Spring AOP?
See http://static.springframework.org/sp...-advice-throws.
If you are talking about pre-built aspects, then I don't think so. What do you want to do when you get an exception? Log it?
Greg L. Turnquist (@gregturn), SpringSource/VMware
Project Lead: Spring Python and author of Spring Python 1.1 and Python Testing Cookbook.
Listen to Pond Jumpers, the international podcast for open source developers.
These comments are my own personal opinions, and do not reflect those of my company.
In my methods I don't want repeat the same catch statements.
for example DataAccessException.
I want to log the exception, create a new exception with a custom message and rethrow it.
AOP Is great at applying the same solution to lots of different places based on rules. If every instance has custom code, i.e. a different solution, AOP doesn't fit the bill in my book.
Greg L. Turnquist (@gregturn), SpringSource/VMware
Project Lead: Spring Python and author of Spring Python 1.1 and Python Testing Cookbook.
Listen to Pond Jumpers, the international podcast for open source developers.
These comments are my own personal opinions, and do not reflect those of my company.
You could define a pointcut that will be applied after throwing a certain exception. Even with a simple around advice, you could handle the exception in a proper way.
But why would you like to rethrow it?
If it is an unrecoverable exception, it is not likely that you can do anything with the new exception.