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

Allow arguments in constructor #3

Closed
binarykitchen opened this issue Dec 16, 2013 · 1 comment
Closed

Allow arguments in constructor #3

binarykitchen opened this issue Dec 16, 2013 · 1 comment

Comments

@binarykitchen
Copy link

Would be great if we can pass on arguments to the constructor!

For example

var sub = new SubCustomError('My Message', {status: 404});

where 404 is a status whose default can be defined like that:

var SubCustomError = createError(MyCustomError, 'CoolSubError', {status: 400});
@tgriesser
Copy link
Owner

Yeah this would be neat. Adding now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants