tweaks replacement events: %crud contents, %warn structure

This commit is contained in:
Joe Bryan 2019-04-24 22:21:09 -07:00
parent 450fd5199e
commit cfb6202edb

View File

@ -406,12 +406,15 @@ _worker_lame(c3_d evt_d, u3_noun ovo, u3_noun why, u3_noun tan)
}
// failed event notifications (%crud) are replaced with
// an even more generic notifications, on a generic arvo wire.
// N.B this must not be allowed to fail!
//
// N.B this must not be allowed to fail!
// [%warn original-event-tag=@tas combined-trace=(list tank)]
//
else if ( c3__crud == tag ) {
u3_noun lef = u3nc(c3__leaf, u3i_tape("crude crashed!"));
u3_noun nat = u3kb_weld(u3k(u3t(cad)), u3nc(lef, u3k(tan)));
rep = u3nc(u3nt(u3_blip, c3__arvo, u3_nul),
u3nc(c3__warn, u3i_tape("crude crashed!")));
u3nt(c3__warn, u3k(u3h(cad)), nat));
}
// failed failure failing fails
//
@ -421,11 +424,14 @@ _worker_lame(c3_d evt_d, u3_noun ovo, u3_noun why, u3_noun tan)
}
// failure notifications are sent on the same wire
//
// [%crud event-tag=@tas event-trace=(list tank)]
//
else {
// prepend failure mote to tank
//
u3_noun tap = u3kb_weld(u3i_tape("bail: "), u3qc_rip(3, why));
u3_noun nat = u3nc(u3nc(c3__leaf, tap), u3k(tan));
u3_noun lef = u3nc(c3__leaf, u3kb_weld(u3i_tape("bail: "),
u3qc_rip(3, why)));
u3_noun nat = u3kb_weld(u3k(tan), u3nc(lef, u3_nul));
rep = u3nc(u3k(wir), u3nt(c3__crud, u3k(tag), nat));
}