Skip to content

Deprecate Terror.ensureError #28

@narqo

Description

@narqo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions