Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] after throwing question ...

Hi Fabio,

You could rethrow another exception in after throwing advice but to exit the
join point without throwing you would need to catch it in an around advice.


-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Fabio Fagundes
Silveira
Sent: Friday, September 22, 2006 10:26 AM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] after throwing question ...

Hello,

   Is there any way to "stop" an exception propagation raised in a
method?  For example:

  after(Object o, double d) throwing:
	 execution(* Foo.m1(..)) &&
	 target(o)
	 && args(d){

		//do something

		//stop the exception propagation

			}

		}

	
  In such example, after m1 returns with an exception raised, I would
like to do something and stop or "catch" such an exception ... I know
that with around it is possible ... but is it with after throwing?

Regards,
Fabio



_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top