feat: add pid.forward_error(anyerror)
This commit is contained in:
parent
9a51d756ce
commit
ca2e24f15b
1 changed files with 7 additions and 0 deletions
|
@ -74,6 +74,13 @@ fn Pid(comptime own: Ownership) type {
|
||||||
return CallContext.call(a, self.ref(), message.fmt(request));
|
return CallContext.call(a, self.ref(), message.fmt(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn forward_error(self: Self, e: anyerror) result {
|
||||||
|
return self.send_raw(switch (e) {
|
||||||
|
error.Exit => .{ .buf = error_message() },
|
||||||
|
else => exit_message(e),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
pub fn link(self: Self) result {
|
pub fn link(self: Self) result {
|
||||||
return c.thespian_link(self.h);
|
return c.thespian_link(self.h);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue