mckelvey / instagram-node-lib

The Instagram Node Lib is a helper library for node that makes communicating with the Instagram API easy.
http://david.mckelveycreative.com/
Other
303 stars 49 forks source link

try catch around complete causing confusing errors #15

Open kumikoda opened 11 years ago

kumikoda commented 11 years ago

i originally posted this as an issue i thought your library had. But i quickly realized that this was an error in my own code.

The confusion stems from the try/catch in class.instagram.coffee at line 129. I think your try catch is intended for the JSON.parse() line but it covers the complete statement as well, causing it to catch any uncaught errors in the callback. Instead, would it better just to throw the otherwise uncaught exception?

gabrielstuff commented 10 years ago

agree , I fall in the same trap