Added validation and test for non-int error_code defaulting to 0.
Merge pull request #106 from gfosco/error_code

Added validation and test for non-int error_code defaulting to 0.