arcaneframework / alien

Alien: an interface for linear solvers
Apache License 2.0
8 stars 7 forks source link

Error handling #50

Open cedricchevalier19 opened 3 years ago

cedricchevalier19 commented 3 years ago

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 use std::optional which is supported.

This way to deal with error has been proven successful in Haskell and Rust.

cedricchevalier19 commented 3 years ago

https://github.com/TartanLlama/expected is an implementation of such API.