mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
LibJS+Everywhere: Convert JS::Error to String
This includes an Error::create overload to create an Error from a UTF-8 StringView. If creating a String from that view fails, the factory will return an OOM InternalError instead. VM::throw_completion can also make use of this overload via its perfect forwarding.
This commit is contained in:
parent
153b793638
commit
88814acbd3
36 changed files with 198 additions and 151 deletions
|
@ -219,7 +219,7 @@ JS::ThrowCompletionOr<JS::Value> fetch(JS::VM& vm)
|
|||
}
|
||||
return record_union_type;
|
||||
}
|
||||
return vm.throw_completion<JS::TypeError>("No union types matched");
|
||||
return vm.throw_completion<JS::TypeError>("No union types matched"sv);
|
||||
};
|
||||
Optional<Variant<Vector<Vector<DeprecatedString>>, OrderedHashMap<DeprecatedString, DeprecatedString>>> headers_value;
|
||||
if (!headers_property_value.is_nullish())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue