Stream: project-error-handling

Topic: async error handling terminology


view this post on Zulip Charles Lew (Sep 13 2020 at 01:32):

Somehow, i feel there's a correspondence between "abort, retry, ignore" strategies and the async error handling strategies. ? means abort, unwrap_or etc means ignore, and there's no support for retry yet.

view this post on Zulip Stefan dns2utf8 Schindler (Sep 14 2020 at 15:47):

If you were to roll your own, how would you express a certain behaviour?

view this post on Zulip Stefan dns2utf8 Schindler (Sep 14 2020 at 15:48):

Like there are situations where 5 retries would be best, sometimes one needs to wait a certain amount of time before a retry and so on

view this post on Zulip Charles Lew (Sep 14 2020 at 17:41):

I haven't thought it through, but there're community crates like tokio-retry or tower-retry that serve as examples...

view this post on Zulip Jane Lusby (Sep 14 2020 at 19:02):

Charles Lew said:

I haven't thought it through, but there're community crates like tokio-retry or tower-retry that serve as examples...

more recently there's also tower-hedge which implements a dynamic retry policy https://github.com/tower-rs/tower/blob/master/tower/src/hedge/mod.rs

view this post on Zulip Jane Lusby (Sep 14 2020 at 19:04):

I don't personally feel like "retry" is a fundamental operation of error handling in the same way that ? represents the fundamental "try to do this" operation. Retries feel like higher level policies composed ontop of the try operation.

view this post on Zulip Jane Lusby (Sep 14 2020 at 19:05):

<deleted>

view this post on Zulip Jane Lusby (Sep 14 2020 at 19:06):

actually

view this post on Zulip Jane Lusby (Sep 14 2020 at 19:06):

thinking about it thats not a clear distinction

view this post on Zulip Jane Lusby (Sep 14 2020 at 19:06):

nvm on that last bit

view this post on Zulip Jane Lusby (Sep 14 2020 at 19:06):

picking a default regardless of the content of the error is ignoring now that I think of it even for 10 seconds

view this post on Zulip Jane Lusby (Sep 14 2020 at 19:06):

lol

view this post on Zulip Stefan dns2utf8 Schindler (Sep 14 2020 at 21:29):

To be honest, I start to see the benefits of the actor model more and more

view this post on Zulip Stefan dns2utf8 Schindler (Sep 14 2020 at 21:30):

So a parent actor can handle the child actors errors

view this post on Zulip Stefan dns2utf8 Schindler (Sep 14 2020 at 21:31):

That way one can implement different policies in different situations


Last updated: Jan 29 2022 at 10:01 UTC