Error Handling and Outcome

It's recommended to use -fno-exceptions with this library. How does it handle errors? The answer is that it uses the outcome library(https://github.com/ned14/outcome).

Internally, ark::result is aliased to outcome::result(outcome::std_result in fact), and these macros are also aliased to match the style of GSL macros:

  • Try -> OUTCOME_TRY
  • CoTry -> OUTCOME_CO_TRY

The other parts of outcome library is not used for simplicity.

Refer to the documents of outcome library(https://ned14.github.io/outcome/) for usage.

This is (in my opinion) not the optimal state of c++ error handling, will switch to herbceptions(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0709r1.pdf) when the time is right.