mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +00:00
LibDiff: Make Diff::parse_hunks fallible
Currently the only error that can happen is an OOM. However, in the future there may be other errors that this function may throw, such as detecting an invalid patch.
This commit is contained in:
parent
dbd838efdf
commit
23df5748f6
4 changed files with 10 additions and 9 deletions
|
@ -88,7 +88,7 @@ void EditorWrapper::save()
|
|||
void EditorWrapper::update_diff()
|
||||
{
|
||||
if (m_git_repo) {
|
||||
m_hunks = Diff::parse_hunks(m_git_repo->unstaged_diff(filename()).value());
|
||||
m_hunks = Diff::parse_hunks(m_git_repo->unstaged_diff(filename()).value()).release_value_but_fixme_should_propagate_errors();
|
||||
editor().update_git_diff_indicators().release_value_but_fixme_should_propagate_errors();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue