return parseMeta(b.getPid("Meta"), b.get("Event"));
}
private static MetaEvent parseMeta(final OtpErlangPid pid, final OtpErlangObject event) {
try {
Bindings b = OtpErlang.match("{break_at, Mod:a, Line:i, Crt}", event);
if (b != null) {
return new BreakAtEvent(pid, b.getAtom("Mod"), b.getInt("Line"),
b.get("Crt"));
}
b = OtpErlang.match("{exit_at, Pos, Reason, Le, OrigPid:p}", event);
if (b != null) {
return new ExitAtEvent(pid, b.get("Pos"), b.get("Reason"), b.get("Le"),
b.getPid("OrigPid"));
}
b = OtpErlang.match("{exit_at, Pos, Reason, Le, OrigPid:p, Stack:l, Binds:l}",
event);
if (b != null) {
return new ExitAtEvent(pid, b.get("Pos"), b.get("Reason"), b.get("Le"),
b.getPid("OrigPid"), (OtpErlangList) b.get("Stack"),
(OtpErlangList) b.get("Binds"));
}
b = OtpErlang.match("{wait_at, Mod:a, Line:i, Crt}", event);
if (b != null) {
return new WaitAtEvent(pid, b.getAtom("Mod"), b.getInt("Line"),
b.get("Crt"));
}
} catch (final Exception e) {
}
// this is a default event that does nothing
return new MetaEvent(pid, event);