@@ -2002,14 +2002,14 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
20022002 const info = v8 .FunctionCallbackInfo .initFromV8 (raw_info );
20032003 var caller = Caller (Self , State ).init (info );
20042004 defer caller .deinit ();
2005-
20062005 // See comment above. We generateConstructor on all types
20072006 // in order to create the FunctionTemplate, but there might
20082007 // not be an actual "constructor" function. So if someone
20092008 // does `new ClassName()` where ClassName doesn't have
20102009 // a constructor function, we'll return an error.
20112010 if (@hasDecl (Struct , "constructor" ) == false ) {
20122011 const iso = caller .isolate ;
2012+ log .warn (.js , "Illegal constructor call" , .{ .name = @typeName (Struct ) });
20132013 const js_exception = iso .throwException (createException (iso , "Illegal Constructor" ));
20142014 info .getReturnValue ().set (js_exception );
20152015 return ;
@@ -3420,7 +3420,7 @@ fn valueToDetailString(arena: Allocator, value: v8.Value, isolate: v8.Isolate, v
34203420 if (debugValueToString (arena , value .castTo (v8 .Object ), isolate , v8_context )) | ds | {
34213421 return ds ;
34223422 } else | err | {
3423- log .err (.js , "debug serialize value" , .{.err = err });
3423+ log .err (.js , "debug serialize value" , .{ .err = err });
34243424 }
34253425 }
34263426 }
0 commit comments