summaryrefslogtreecommitdiff
path: root/Meta/Lagom
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2022-12-11 19:21:36 +0100
committerAndreas Kling <kling@serenityos.org>2022-12-12 14:16:42 +0100
commit9a3e95785e80a6b03e8d71605ddb603bb6776b69 (patch)
treeabeba5b04e7b452041dc3054fbac56dc1b91d482 /Meta/Lagom
parent6c7c5a6786f5f168b9e228f9d4b41ed1e64bc8f3 (diff)
downloadserenity-9a3e95785e80a6b03e8d71605ddb603bb6776b69.zip
LibCore: Propagate errors from `Stream::*_entire_buffer`
Diffstat (limited to 'Meta/Lagom')
-rw-r--r--Meta/Lagom/Tools/CodeGenerators/LibWeb/GeneratorUtil.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GeneratorUtil.h b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GeneratorUtil.h
index d281ae77b8..f3b396a756 100644
--- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GeneratorUtil.h
+++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GeneratorUtil.h
@@ -59,7 +59,6 @@ ErrorOr<JsonValue> read_entire_file_as_json(StringView filename)
auto file = TRY(Core::Stream::File::open(filename, Core::Stream::OpenMode::Read));
auto json_size = TRY(file->size());
auto json_data = TRY(ByteBuffer::create_uninitialized(json_size));
- if (!file->read_entire_buffer(json_data.bytes()))
- return Error::from_string_literal("Failed to read json file.");
+ TRY(file->read_entire_buffer(json_data.bytes()));
return JsonValue::from_string(json_data);
}