by hakfoo · 5y ago · 0 comments
The alternative I've seen tends to be something like "set $faulted when you realize something is unrecoverable, then make sure the entire rest of the function checks for it and makes sure not to do anything else if we've already identified a fault."
http://open-std.org/JTC1/SC22/WG21/docs/papers/2018/p0709r0....
This is likely inspired by the Error monad in Haskell, and the doc might say so explicitly (I don't remember).