diff options
Diffstat (limited to 'vendor/libghostty-vt/pkg/wuffs/src/error.zig')
| -rw-r--r-- | vendor/libghostty-vt/pkg/wuffs/src/error.zig | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/vendor/libghostty-vt/pkg/wuffs/src/error.zig b/vendor/libghostty-vt/pkg/wuffs/src/error.zig new file mode 100644 index 00000000..0be55cf4 --- /dev/null +++ b/vendor/libghostty-vt/pkg/wuffs/src/error.zig @@ -0,0 +1,13 @@ +const std = @import("std"); + +const c = @import("c.zig").c; + +pub const Error = std.mem.Allocator.Error || error{ WuffsError, Overflow }; + +pub fn check(log: anytype, status: *const c.struct_wuffs_base__status__struct) error{WuffsError}!void { + if (!c.wuffs_base__status__is_ok(status)) { + const e = c.wuffs_base__status__message(status); + log.warn("decode err={s}", .{e}); + return error.WuffsError; + } +} |
