Open MarcoRossignoli opened 6 years ago
Can you clarify your retry scenario? You catch TE and then examine the TimesSpan on it and decide whether to retry somehow? Maybe a code snippet would help.
@danmosemsft updated, i'm working with hardware printers handled by a json/rpc server(provided by printer sdk). Server is not so reliable...and sometimes some type of command works after some retry but not always and not always behave in the same way(for example i know that if i retry some command for more than 30 seconds i need to "reset" something to go on). I could(and for now) resolve subclassing exceptions, but knowing timeout nature code could be less and more clear maybe.
Rationale
I'm working on a project where i need to heavily use TimeoutException.
Today we cannot pass TimeSpan to TimeoutException, like ParamName for ArgumentException. Could be useful add overloads to pass TimeSpan when throw exception, this could be useful for some reason:
Proposed API
Usage
Extra
I didn't found any issue with this on repo , but i suspect that this is not new topic. I found on codebase an implementation for RegEx