don't @panic!

This commit is contained in:
Halil Durak committed 2026-01-15 20:40:53 +03:00
1 parent 58634b54ec
commit ea2fc76d3c
1 file changed
+6 -1
+6 -1
View File
@@ -295,6 +295,7 @@ pub const CryptoKey = struct {
if (std.mem.eql(u8, "X25519", name)) {
return initX25519(extractable, key_usages, page);
}
log.warn(.not_implemented, "CryptoKey.init", .{ .name = name });
return error.NotSupported;
},
.object => |object| {
@@ -303,9 +304,13 @@ pub const CryptoKey = struct {
if (std.mem.eql(u8, "X25519", name)) {
return initX25519(extractable, key_usages, page);
}
log.warn(.not_implemented, "CryptoKey.init", .{ .name = name });
return error.NotSupported;
},
else => {
log.warn(.not_implemented, "CryptoKey.init", .{ .algorithm = algorithm });
return error.NotSupported;
},
else => @panic("NYI"),
};
}