#35 new
Kit Goncharov

Add exception handling to Fuse.Timer

Reported by Kit Goncharov | July 8th, 2009 @ 01:37 PM

Currently, Fuse.Timer just rethrows any errors when executing the callback. I'm thinking of adding a new option (a la Ajax.Request) for specifying a callback if an exception is encountered (if it's not specified, the error will just be rethrown):

//Old syntax
new Fuse.Timer({
    callback: function(timer){ ... },
    timeout: 10
});
//New syntax
new Fuse.Timer({
    //`onTimeout` seems more consistent with `onException` than `callback`...should we change it?
    onTimeout: function(timer){ ... },
    onException: function(exception, timer){ ... },
    timeout: 10
});

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

JavaScript frameworks share similar features and functionality such as DOM manipulation, event registration, and CSS selector engines. FuseJS attempts to incorporate the strengths of these frameworks into one stable, efficient, and optimized core JavaScript framework.

Tags

Referenced by

Pages