improve event's log result

This commit is contained in:
Pierre Tachoire
2024-11-18 13:13:52 +01:00
parent 0788e22dd5
commit f6ad95c647
2 changed files with 7 additions and 3 deletions

View File

@@ -382,7 +382,11 @@ pub const XMLHttpRequest = struct {
self.reset(alloc);
self.url = try alloc.dupe(u8, url);
self.uri = std.Uri.parse(self.url.?) catch return DOMError.Syntax;
self.uri = std.Uri.parse(self.url.?) catch |err| {
log.debug("parse url ({s}): {any}", .{ self.url.?, err });
return DOMError.Syntax;
};
log.debug("open url ({s})", .{self.url.?});
self.sync = if (asyn) |b| !b else false;
self.state = OPENED;