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

Deprecate Terror.ensureError #28

Open
narqo opened this issue Apr 28, 2015 · 1 comment
Open

Deprecate Terror.ensureError #28

narqo opened this issue Apr 28, 2015 · 1 comment

Comments

@narqo
Copy link

narqo commented Apr 28, 2015

Terror.ensureError() looks like a rudimental method. All it does is call to Terror.createError() in case passed error object is not a Terror instance. And the most strange thing here is that it's arguments are swapped if you compare it with createError. Take a look:

Terror.ensureError = function(error, code) {
  return /*···*/ this.createError(code, error);
};

I propose to deprecate Terror.ensureError() and use Terror.createError() only.

@kaero
Copy link
Contributor

kaero commented Apr 28, 2015

lgtm as an idea

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 a pull request may close this issue.

2 participants