Alternatives to exceptions for error handling
Andre Pany
andre at s-e-a-p.de
Mon Nov 30 16:02:32 UTC 2020
On Monday, 30 November 2020 at 12:59:32 UTC, Jacob Carlborg wrote:
> On Monday, 30 November 2020 at 11:43:01 UTC, Ola Fosheim
> Grøstad wrote:
>
>> [...]
>
> In Ruby there's the `retry` keyword for this. Although you
> cannot control the recovery handler from the outside, like in
> your example. In D terms you would put `retry` in a `catch`
> block and it would run the code inside the `try` block again.
>
> --
> /Jacob Carlborg
In java there is a nice library solution called fail safe:
https://jodah.net/failsafe/
Something like that is missing in D (code.dlang.org).
Kind regards
Andre
More information about the Digitalmars-d
mailing list