package ex4;
import ch.usi.dag.disl.annotation.Before;
import ch.usi.dag.disl.dynamiccontext.DynamicContext;
import ch.usi.dag.disl.marker.BytecodeMarker;
public class Instrumentation {
@Before(marker = BytecodeMarker.class, args = "athrow", scope = "ex4.MainThread.*")
static void beforeThrowing(final DynamicContext dc) {
final Throwable throwableThrown = dc.getStackValue(0, Throwable.class);
Profiler.countException(throwableThrown);
}