Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] extension of the handler pointcut

From: Ramnivas Laddad <ramnivas@xxxxxxxxx>
Subject: Re: [aspectj-dev] extension of the handler pointcut
Date: Tue, 22 Jul 2003 07:39:38 -0700 (PDT)

> You don't need the proposed extension to achieve what you want.
> You need to combiner an args() pointcut with handler() to 
> capture the exception as follows:
> 
> aspect InsertCode {
>     before(IOException e)
>         : withincode(void Foo.bar())
>         && handler(IOException) 
>         && args(e) {              // This captures the exception
>         e.printStackTrace();
>     }    
> }
> 
> -Ramnivas

Oh! it's very nice.  I didn't know it.  Thank you.

Susumu YAMAZAKI <yamazaki@xxxxxxxxxxxxxxx>


Back to the top