mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:37:45 +00:00
FontEditor: Include file basename in error messages when available
And write messages in the [action] failed: [error] format to match common error message formatting elsewhere in Userland.
This commit is contained in:
parent
9725fd162f
commit
92a75ccaed
3 changed files with 24 additions and 22 deletions
|
@ -82,12 +82,10 @@ public:
|
|||
virtual void undo() override
|
||||
{
|
||||
if (!m_redo_state) {
|
||||
if (auto maybe_state = m_undo_state->save_state(); !maybe_state.is_error()) {
|
||||
auto state = maybe_state.release_value();
|
||||
m_redo_state = move(state);
|
||||
} else {
|
||||
warnln("Failed to save redo state: {}", maybe_state.error());
|
||||
}
|
||||
if (auto maybe_state = m_undo_state->save_state(); !maybe_state.is_error())
|
||||
m_redo_state = move(maybe_state.value());
|
||||
else
|
||||
warnln("Saving redo state failed: {}", maybe_state.error());
|
||||
}
|
||||
m_undo_selection.restore_state(*m_undo_state);
|
||||
}
|
||||
|
@ -96,7 +94,7 @@ public:
|
|||
if (m_redo_state)
|
||||
m_undo_selection.restore_state(*m_redo_state);
|
||||
else
|
||||
warnln("Failed to restore state");
|
||||
warnln("Restoring state failed");
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue