Closed ptusch closed 9 years ago
:+1:
cool, if we're going to do this, I actually prefer to switch the arguments around with err being first. What do you think?
Thats propably a matter of personal taste. I myself like it more at the end, but I don't care much.
I don't think you can switch the arguments around without breaking code of existing applications. If application X doesn't support proper checks for the result (and you can't expect that!), it will fail horribly for them.
See this for clarification: http://pastebin.com/abA2aKRv
Any thoughts about the PR/idea from the maintainer? I'd love to use error handling. For now I use a 500 ms timeout which is just wrong and ugly.
It looks good, thanks
Thank you very much! :)
Error handling will be a pleasure for external libraries. A basic throw will stop the entire process and there won't be a return or callback.
Now you receive an error if you have no bower_components or something went wrong with bower-json.