diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-06 11:29:32 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-08 00:35:27 +0100 |
commit | 2116620db8df03e67543d1e0abb50d2135626d7c (patch) | |
tree | 9cea2ac772f478588201d0320f1a5a2eb9ad92d6 /AK | |
parent | f23f99d51b03b9cb2154b93d3c84269a2eb285b7 (diff) | |
download | serenity-2116620db8df03e67543d1e0abb50d2135626d7c.zip |
AK: Add ErrorOr<T>::release_value_but_fixme_should_propagate_errors()
This is an alternative to ErrorOr<T>::release_value() that can be used
when converting code to signal that we're releasing the value without
error propagation as a way to move forward now.
This makes these cases much easier to find later on, once more paths for
error propagation are available.
Diffstat (limited to 'AK')
-rw-r--r-- | AK/Error.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/AK/Error.h b/AK/Error.h index 745328e0f5..ba318e082d 100644 --- a/AK/Error.h +++ b/AK/Error.h @@ -78,6 +78,8 @@ public: T release_value() { return m_value.release_value(); } Error release_error() { return m_error.release_value(); } + T release_value_but_fixme_should_propagate_errors() { return release_value(); } + private: Optional<T> m_value; Optional<Error> m_error; |