Use JS Error object instead of handmade hash
Add resultCode back to error object
Merge pull request #82 from doo/fix_error_reporting_to_use_real_error_object

Fix error reporting to use real error object