Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix callee for strict mode #18

Closed
wants to merge 1 commit into from
Closed

fix callee for strict mode #18

wants to merge 1 commit into from

Conversation

romanesko
Copy link

No description provided.

@ghost
Copy link

ghost commented Nov 25, 2017

+1

init.call(this, 'CustomError', message, cause)
}

CustomError.prototype = new Error()

function createError (errno, type, proto) {
var createError = function f(errno, type, proto) {
var err = function (message, cause) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's more correct to use the inner anonymous function instead, since it's actually part of the callstack when the error is created (i.e. not when the error type is created).

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.

None yet

2 participants