[Soot-list] Jimple Traps
Martin Schäf
martinschaef at googlemail.com
Sat Nov 26 07:43:18 EST 2011
Hi,
I'm trying to check which exceptions can be thrown by a method and
which ones are already caught by the traps in Jimple.
That is, in the example:
public void throwsException(int size) {
throw new EmptyStackException();
}
public void catchException(int a) {
try { throwsException(a); } catch (EmptyStackException e) { }
}
public void dontcatch(int x) throws EmptyStackException {
throwsException(x);
}
I want to find out that throwsException throws an exception, and
catchException doesn't.
Hence I want to check if a Unit is in a Try Block. What is the most
elegant way to iterate
from Trap.getBeginUnit() to Trap.getEndUnit() ?
Or is there a shortcut to do all this?
Thanks,
M
More information about the Soot-list
mailing list