mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:48:12 +00:00
LibWeb: Convert NodeOperations to use TRY for error propagation
This commit is contained in:
parent
3861396fe4
commit
8d20fb1e94
1 changed files with 1 additions and 3 deletions
|
@ -35,9 +35,7 @@ ExceptionOr<NonnullRefPtr<Node>> convert_nodes_to_single_node(Vector<Variant<Non
|
|||
NonnullRefPtr<Node> document_fragment = adopt_ref(*new DocumentFragment(document));
|
||||
for (auto& unconverted_node : nodes) {
|
||||
auto node = potentially_convert_string_to_text_node(unconverted_node);
|
||||
auto result = document_fragment->append_child(node);
|
||||
if (result.is_exception())
|
||||
return result.exception();
|
||||
(void)TRY(document_fragment->append_child(node));
|
||||
}
|
||||
|
||||
return document_fragment;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue