public override sealed IObject Construct(IEnvironment environment, IArgs args) { var message = args[0].ConvertToString(); if (message.BaseValue == "undefined") { message = environment.CreateString(""); } var error = new NUriError(environment); error.Class = "Error"; error.Extensible = true; error.Prototype = environment.UriErrorPrototype; error.Put("message", message, false); return error; }
public sealed override IObject Construct(IEnvironment environment, IArgs args) { var message = args[0].ConvertToString(); if (message.BaseValue == "undefined") { message = environment.CreateString(""); } var error = new NUriError(environment); error.Class = "Error"; error.Extensible = true; error.Prototype = environment.UriErrorPrototype; error.Put("message", message, false); return(error); }