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.
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.