Re: [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]>
how can i give the entire package in the within()  if my package stucture
is like this :

     com.mycom.core
                       .util
                       .aop 




On Fri, 18 Mar 2005 04:11:20 -0800 (PST), ravi kumar <[email protected]> wrote:
> 
> 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
>
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.