Re: [Sugar-devel] Error handling in async js code

2013-06-02 Thread Daniel Narvaez
I'm sending patches to fix all of these things up in the current code. On 1 June 2013 13:50, Daniel Narvaez dwnarv...@gmail.com wrote: Another couple of related things * We should always pass an Error object to the callback, not a string. * The name of the callback in the functions

Re: [Sugar-devel] Error handling in async js code

2013-06-01 Thread Daniel Narvaez
Another couple of related things * We should always pass an Error object to the callback, not a string. * The name of the callback in the functions signature should just be callback. * I also think there should only be one callback per function, need to change a bit the ds API to avoid multiple

Re: [Sugar-devel] Error handling in async js code

2013-05-31 Thread Manuel QuiƱones
2013/5/30 Daniel Narvaez dwnarv...@gmail.com: Hello, in the async API we have written so far we have not been handling errors very consistently. I think we should just adopt the nodejs convention. The first parameter passed to all the async callbacks is an error or null if the call

[Sugar-devel] Error handling in async js code

2013-05-30 Thread Daniel Narvaez
Hello, in the async API we have written so far we have not been handling errors very consistently. I think we should just adopt the nodejs convention. The first parameter passed to all the async callbacks is an error or null if the call succeeded. -- Daniel Narvaez