mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:47:44 +00:00
HexEditor: Propagate errors when using "Save as"
This commit is contained in:
parent
3d914247cc
commit
2bba743c24
5 changed files with 25 additions and 31 deletions
|
@ -146,8 +146,8 @@ HexEditorWidget::HexEditorWidget()
|
|||
if (response.is_error())
|
||||
return;
|
||||
auto file = response.release_value();
|
||||
if (!m_editor->save_as(file.release_stream())) {
|
||||
GUI::MessageBox::show(window(), "Unable to save file.\n"sv, "Error"sv, GUI::MessageBox::Type::Error);
|
||||
if (auto result = m_editor->save_as(file.release_stream()); result.is_error()) {
|
||||
GUI::MessageBox::show(window(), DeprecatedString::formatted("Unable to save file: {}\n"sv, result.error()), "Error"sv, GUI::MessageBox::Type::Error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue