CC-Archived / promise-as3

Promises/A+ compliant implementation in ActionScript 3.0
167 stars 52 forks source link

Promise.timeout should throw a Typed Error #39

Closed petermd closed 10 years ago

petermd commented 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?

honzabrecka commented 10 years ago

+1

k7sleeper commented 10 years ago

Just created a PR #41 for that enhancement.

petermd commented 10 years ago

Great. Thx.