[aspectwerkz-user] can we use Exception class to handle all types of Exceptions
ravi kumar <[email protected]>
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <[email protected]> |
hi all,
i am going to write Exception Aspect which has to
handle all the
different types of Exceptions like
SQLException,NullPointerException...etc
so for that to achieve can i use the below tag in the
aop.xml
configuration tag
<aspect class="ExceptionHandlingAspect">
<pointcut name="AllException"
expression="handler(java.lang.Exception+) "/>
<advice name="getException"
type="before"
bind-to="AllException" />
</aspect>
so that it will handle all the classes in the entrie
package.
and in the aspect class i will check the Exception
type by using "
instanaof "
is it the right way ...?
waiting for ur reply
with regards
ravi kumar
__________________________________
Do you Yahoo!?
Make Yahoo! your home page
http://www.yahoo.com/r/hs