Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Change flow of program in Advice

Hmmm, I don't really see how this question has anything to do with
AspectJ...

>  I want to change control flow of a program when my specified
condition
> in advice section holds.
> for example : before a call to pop method in Stack, i want to check
> that Stack is not empty. if it's empty execution of program must
> stopped.
> How can i stop my program ?

What about this?

throw new AssertionViolatedException("Stack is empty: " + stack);

You might find our work on trace assertions useful:
http://www.sable.mcgill.ca/jlo/

Eric

--
Eric Bodden
Sable Research Group, McGill University
Montreal, Canada
http://bodden.de




Back to the top