1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

LibGUI+Userland: Make GML unregistered_child_handler fallible

This commit is contained in:
Sam Atkins 2022-12-30 11:33:58 +00:00 committed by Tim Flynn
parent 2069a5a2a0
commit fa98034ff7
6 changed files with 16 additions and 16 deletions

View file

@ -27,8 +27,8 @@ void GMLPreviewWidget::load_gml(DeprecatedString const& gml)
return;
}
load_from_gml(gml, [](DeprecatedString const& name) -> RefPtr<Core::Object> {
return GUI::Label::construct(DeprecatedString::formatted("{} is not registered as a GML element!", name));
load_from_gml(gml, [](DeprecatedString const& name) -> ErrorOr<NonnullRefPtr<Core::Object>> {
return GUI::Label::try_create(DeprecatedString::formatted("{} is not registered as a GML element!", name));
});
if (children().is_empty()) {