public static void invokeProbeOnException(Object exceptionValue, int id,
Object states) {
FlashlightProbe probe = probeMap.get(id);
if (probe != null) {
try {
probe.fireProbeOnException(exceptionValue, (ArrayList<FlashlightProbe.ProbeInvokeState>)states);
} catch (ClassCastException e) {
// Make sure the state we got was really ok, internal error if that happens
}
}
}