chore(io): rewrite certain error messages

We can do this now that we know that it won't be because of any
unimplemented feature in some circumstances
This commit is contained in:
2022-10-29 02:37:33 -03:00
parent c831f67d1a
commit 647bd83224
4 changed files with 31 additions and 25 deletions

View File

@@ -143,7 +143,7 @@ pub const io = struct {
return 0;
}
pub fn undef(comptime T: type, log: anytype, comptime format: []const u8, args: anytype) ?T {
pub fn undef(comptime T: type, comptime log: anytype, comptime format: []const u8, args: anytype) ?T {
@setCold(true);
const unhandled_io = config.config().debug.unhandled_io;
@@ -153,6 +153,13 @@ pub const io = struct {
return null;
}
pub fn err(comptime T: type, comptime log: anytype, comptime format: []const u8, args: anytype) ?T {
@setCold(true);
log.err(format, args);
return null;
}
};
pub const write = struct {