Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] after() throwing matching on interface

No I don't think this will work. 

The problem here is that the code outside the classes and aspect are
expecting either an Exception1 or an Exception2, so if the aspect suddenly
starts throwing Exception, then it still wont compile. It's just the same
problem, but more of it!

Ian


------------------------------

Message: 3
Date: Wed, 7 Dec 2005 12:46:13 -0000
From: "Conway. Fintan (IT Solutions)" <Fintan.Conway@xxxxxx>
Subject: RE: [aspectj-users] after() throwing matching on interface
	throws	clauses rather than method implementation
To: <aspectj-users@xxxxxxxxxxx>
Message-ID:
	<8CD019DE020A48499A1F8D4E8FAE48E40D1147@xxxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"

Hi Ian,
 
Could you modify your 'after throwing()' to catch the Exceptions as follows
:
 
Catch Exception1 -
    after throwing(Exception1 e1) throws Exception1 : .....
 
Catch Exception2 -
    after throwing(Exception2 e2) throws Exception2 : .....
 
Catch Exception1 & Exception2 -
    after throwing(Exception e) throws Exception : .....
 
Will this give you what you are looking for?
 
HTH,
 
Fintan

	


--------------------------------------------------------------------------------
The information contained herein is confidential and is intended solely for the
addressee. Access by any other party is unauthorised without the express
written permission of the sender. If you are not the intended recipient, please
contact the sender either via the company switchboard on +44 (0)20 7623 8000, or
via e-mail return. If you have received this e-mail in error or wish to read our
e-mail disclaimer statement and monitoring policy, please refer to 
http://www.drkw.com/disc/email/ or contact the sender. 3167
--------------------------------------------------------------------------------



Back to the top