[dojo-contributors] Promises

Eugene Lazutkin eugene at lazutkin.com
Fri Mar 5 01:51:58 EST 2010

Hash: SHA1


On 03/04/2010 11:39 PM, Kris Zyp wrote:
> I did change it to console.error instead of throw per your suggestion,
> see line 88.

Is it still in dojoc/sandbox/promise/Deferred.js? Line #88 is something
different there.

> Right, you do this by registering an error handler at the bottom of your
> call stack.


> Would it help to have a dojo.Deferred.onerror = console.error that could
> be replaced as the default error handler for uncaught errors? But we

You lost me there --- I have no idea what you are talking about.
dojo.Deferred.onerror? Yes? No? Maybe? ;-)

> would still want to be informed about whether or not the error was
> caught (preferably only onerror uncaught errors), wouldn't we? I really

Why? I don't even recall a real situation when I wanted this
functionality. In most cases I want it to be uncaught and default-processed.

> don't want to strip away the users ability to catch and handle errors
> with full control, and I don't see how this can be detected without a
> setTimeout.

Oh, if this part worries you --- it is very easy to fix. Provide a
default processing feature which can do anything you want, including
setTimeout() hackery, and provide this implementation as a separate
module, so if anybody wants it, they can include this module and rejoice.

Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


More information about the dojo-contributors mailing list