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.
This commit is contained in:
Andreas Kling 2021-11-06 11:29:32 +01:00
parent f23f99d51b
commit 2116620db8

View file

@ -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;