That was it. Thanks for quick replies.
On Apr 8, 3:04 pm, "Per Cederberg" <[EMAIL PROTECTED]> wrote:
> Perhaps the issue is the following ordering issue:
>
> var d = .. create deferred ...
> d.addErrback(... error handler ...)
> d.addCallback(... handler ...)
>
> If the callback handler throws an error, the errback isn't called in
> the above case. The order in which one adds errbacks and callbacks is
> important (see the docs). To add a "global" errback, it must be added
> in at the very end:
>
> var d = .. create deferred ...
> d.addCallback(... handler 1 ...)
> d.addCallback(... handler 2 ...)
> d.addErrback(... global error handler ...)
>
> Cheers,
>
> /Per
>
> On Tue, Apr 8, 2008 at 2:35 PM, Bob Ippolito <[EMAIL PROTECTED]> wrote:
>
> > On Tue, Apr 8, 2008 at 4:56 AM, rrva <[EMAIL PROTECTED]> wrote:
>
> > > An errBack is not called when exceptions occur in loadJSONDoc
> > > callbacks. All exceptions are swallowed and only if I single-step with
> > > firebug do I get the exception text. How do I get firebug console logs
> > > of all these exceptions? I put a firebug debugger; statement in the
> > > top of my errBack, but I do not reach it.
>
> > > Exceptions are caught in Async.js:219 (Mochikit 1.3.1)
>
> > > in _fire()
>
> > > 209 try {
> > > 210 res = f(res);
> > > 211 fired = ((res instanceof Error) ? 1 : 0);
> > > 212 if (res instanceof MochiKit.Async.Deferred) {
> > > 213 cb = function (res) {
> > > 214 self._continue(res);
> > > 215 };
> > > 216 this._pause();
> > > 217 }
> > > 218 } catch (err) {
> > > 219 fired = 1;
>
> > We know what MochiKit's source code looks like, but how about you show
> > what you're trying to do? It sounds like you're not putting an errBack
> > on the deferred correctly.
>
> > -bob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---