Closed petermd closed 10 years ago
Promise.timeout throws an Error("message") when timeout occurs. Knowing the difference between a failure and a timeout can be useful.
Suggest adding a TimeoutError instead (similar to CancellationError) so a generic handler can discriminate.
Will create a pull-request unless there is an alternative i've missed?
+1
Just created a PR #41 for that enhancement.
Great. Thx.
Promise.timeout throws an Error("message") when timeout occurs. Knowing the difference between a failure and a timeout can be useful.
Suggest adding a TimeoutError instead (similar to CancellationError) so a generic handler can discriminate.
Will create a pull-request unless there is an alternative i've missed?