bind-js icon indicating copy to clipboard operation
bind-js copied to clipboard

Asynchronous Exception handling API

Open herzi opened this issue 13 years ago • 1 comments

I saw that you've been starting to work on a v2-API for the binding code, please also change the signature of the callback to make this possible:

bind.toFile2('path/to/template', {template: parameters}, function (error, result) {
    if (error) {
        return myErrorHandler(error);
    }

    /* plain old result handling code */
});

This will provide developers with the possibility to actually catch asynchronous exceptions very easily.

herzi avatar Dec 02 '12 12:12 herzi

Good idea. I'll add this in v2. Thanks.

xavi- avatar Dec 02 '12 22:12 xavi-