Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Async error handling has been a nightmare last time I tried a few months ago. Has that improved lately?


Pardon my ignorance, but what do you mean? Handling errors with the async runtime..?

If you just mean handling errors from funcs .. it's no different than non-async, no?


Yes, if all error types from various libraries are `Send` + `Sync` it's easy, if not, you are running into issues where you need to wrap them in reference counted containers because some of them aren't copyable either. Crates like failure, thiserror and anyhow didn't simplify this (although I really like their general approach to wrapping low level errors in high level errors with a breadcrumb trail to details).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: