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:
parent
f23f99d51b
commit
2116620db8
Notes:
sideshowbarker
2024-07-18 01:24:54 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/2116620db8d
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue