[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.sql.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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.