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()
looks like a rudimental method. All it does is call toTerror.createError()
in case passederror
object is not aTerror
instance. And the most strange thing here is that it's arguments are swapped if you compare it withcreateError
. Take a look:I propose to deprecate
Terror.ensureError()
and useTerror.createError()
only.