esnunes / riotjs-loader

riotjs module loader for webpack
MIT License
103 stars 41 forks source link

Throw Error objects as-is #25

Closed joepie91 closed 8 years ago

joepie91 commented 8 years ago

I'm assuming that the old approach to this was in place to deal with strings being thrown - however, when feeding an Error object into an Error constructor, it just destroys the stacktrace. This change will make it only create a new Error object if the error thrown wasn't already one.