Throw doesn't work in asynchronous environments
Pass errors to the callback
Add error parameter to callback
Merge pull request #3 from eric-wieser/patch-1

Throw doesn't work in asynchronous environments