C++ exceptions are notoriously hard to make work in parallel, so return values might be a better way.
std::expected might be a solution but it is not standard yet (https://wg21.link/P0323R10).
In some places, we can use std::optional which is supported.
This way to deal with error has been proven successful in Haskell and Rust.
Alien needs a more robust error handling.
C++ exceptions are notoriously hard to make work in parallel, so return values might be a better way.
std::expected
might be a solution but it is not standard yet (https://wg21.link/P0323R10). In some places, we can usestd::optional
which is supported.This way to deal with error has been proven successful in
Haskell
andRust
.