added error configs and factory to create errors
coerce status to 32 bit integer
add stack trace if in debug mode and coerce status to 32 bit integer
Merge pull request #11 from super-useful/error-factory

Error factory