Expose error code in error object
Merge pull request #9 from hermanschaaf/master

Add error code to error objects