Check DOMError

Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
Francis Bouvier
2023-11-28 17:55:49 +01:00
parent 68db7f2e63
commit 2065d47d8e
15 changed files with 400 additions and 303 deletions

View File

@@ -43,7 +43,9 @@ pub fn main() !void {
// document
doc = try parser.documentHTMLParseFromFileAlloc(arena.allocator(), "test.html");
defer parser.documentHTMLClose(doc);
defer parser.documentHTMLClose(doc) catch |err| {
std.debug.print("documentHTMLClose error: {s}\n", .{@errorName(err)});
};
// create JS vm
const vm = jsruntime.VM.init();