Comment on Designing Javascript APIsparentComments−ville13ySince continuation-passing style is so popular in asynchronous code, errors are typically passed to the callback instead of throwing them. If an error was thrown in, say, a callback for an XMLHttpRequest the original caller would not catch it.
Comments
Since continuation-passing style is so popular in asynchronous code, errors are typically passed to the callback instead of throwing them. If an error was thrown in, say, a callback for an XMLHttpRequest the original caller would not catch it.