Alex Potsides 7051b9c530 fix: throw errors with correct stack trace (#35)
The stack trace of thrown error objects is created when the object is
instantiated - if we defer to a function to create the error we end
up with misleading stack traces.

This PR instantiates errors where errors occur and also uses the
`err-code` module to add a `.code` property so we don't have to depend
on string error messages for the type of error that was thrown.
2019-06-13 14:35:12 +01:00
..
2019-01-10 11:16:03 +00:00
2018-01-28 22:34:55 -08:00
2019-01-10 11:16:03 +00:00
2017-12-07 00:16:38 +13:00