Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Exception handling done thru AOP

Paul,

I often use AOP to handle exceptions and find it valuable. At the same time, there are definitely some cases where exceptions and their handling are *not* crosscutting, and it is helpfully to explicitly throw them and to explicitly handle them in a method. There are also cases where you might start with inline exception handling and then refactor into an aspect as you realize there _is_ a common policy that can be captured.

The moral here is to use aspects to modularize crosscutting concerns. This is true for applying AOP for other concerns that are often crosscutting but sometimes specialized (e.g., logging errors and tracing is natural but sometimes logging is really tied to a specific line of code). 

Ron Bodkin
Chief Technology Officer
New Aspects of Software
o: (415) 824-4690
m: (415) 509-2895


> ------------Original Message------------
> From: "Paul Kusch" <belmondo_paul@xxxxxxxxxxx>
> To: aspectj-users@xxxxxxxxxxx
> Date: Fri, Aug-20-2004 3:16 PM
> Subject: [aspectj-users] Exception handling done thru AOP
>
> Hello,
> 
> I was experimenting with AJ to extract exceptional flows and have mixed 
> 
> feelings. Could you please share your experience? Do you have now 
> applications without any catch statement in primary concern or are you 
> being 
> selective where you use AOP and where you embed catch statements in 
> primary 
> concern code.
> 
> Thank you,
> Paul
> 
> _________________________________________________________________
> Get ready for school! Find articles, homework help and more in the Back 
> to 
> School Guide! http://special.msn.com/network/04backtoschool.armx
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
> 
> 



Back to the top