tl;dr We are thinking about replacing Cu.reportError with console.error, are there any cases which wouldn't be covered?
I noticed that there are some instances in our code where we have incorrectly tried to use Cu.reportError in the same way as console.error. We have tried to use the second argument as an additional string/standard object rather than the stack object that Cu.reportError is expecting.
This made me wonder about the differences between the two
functions, and if we could move to the more standard console.error. There is a 10
year old bug suggesting that we could replace them.
As far as I can tell:
We could very easily do a direct replacement for the majority of
cases via ESLint tooling.
However, does anyone know of any cases that would not be covered when switching to console.error?
Mark