Discussion about this post

User's avatar
Han Jiang's avatar

C++'s coroutine has a funny limit that `co_await` is not allowed in `catch` clauses. What if some async operation failed and then (in the `catch` clause) I need to also asynchronously load some content from disk/Internet as fallback_value/error_message? The impact is that the programmers have to use expected<T,E> as functions' return type everywhere, change `try-catch` clauses to `if` clauses and check whether `co_await` expressions result in values or errors. I.e. back to C-style error handling.

1 more comment...

No posts

Ready for more?