Skip to content

Throw actual Error instance and improve error message#24

Open
ragulka wants to merge 2 commits into
openexchangerates:masterfrom
sliptree:throw-error
Open

Throw actual Error instance and improve error message#24
ragulka wants to merge 2 commits into
openexchangerates:masterfrom
sliptree:throw-error

Conversation

@ragulka

@ragulka ragulka commented Dec 14, 2015

Copy link
Copy Markdown

Related to #8 and #13

Only Error instances in JavaScript provide a stack - this is why there is no stack available, because a simple string is thrown. This PR addresses this issue by throwing an actual Error instance and providing a more detail error message, such as: Cannot convert EUR to USD: exchange rate for USD is missing.

This was referenced Dec 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant