Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] What's a recommended practice regarding uniform exception handling using AOP?

Hi Dmitri,

In addition to some discussion about Exception handling in that article, you
might also be interested to look at how we use AOP to modularize exception
handling in the aTrack open source project using aspects. It's an example
bug tracking application written with AspectJ that uses Struts and
Hibernate. We do, in fact, follow the pattern of converting checked
exceptions to unchecked domain exceptions. aTrack is located at
https://atrack.dev.java.net/ 

You can also see some discussion of exception handling with AOP in our
tutorial on "Enterprise Aspect-Oriented Programming." The slides can be
viewed at http://newaspects.com/presentations/  

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Dmitri Mamrukov
Sent: Friday, April 22, 2005 8:17 AM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] What's a recommended practice regarding uniform
exception handling using AOP?

Greetings!

I'd like to ask what is a recommended practice regarding uniform 
exception handling using AOP. We can write an aspect that captures 
exceptions and process them in a fashion that suits our needs. So I feel 
that I don't have to write Exception.printStackTrace(); or similar 
hardcoded exception handling anymore (except for business-specific 
exception handling, of course). However, this would look like notorious 
exception silencing to an outside observer.

try
{
   ...
}
catch (Exception e)
{
}

Is this acceptable since I use aspects as a concrete part of the design 
(i.e. production aspects)? Is there another approach?

Regards,
Dmitri

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users





Back to the top