Say I write a package
atom-foo that calls some external program
foo. Say that the user doesn’t have
foo. An error will happen. Very good. How do I report this error, though?
Naively, I tried
console.error, and that did print to the console just fine, but it doesn’t seem to automatically open the console after an error has been printed, so the poor user has no idea what has gone wrong.
So I tried to embed a div outlet into my view, and “printed” my error message into that. That worked fine. But when I added styling to this div, I knew that it was the wrong approach: for sure, we want different errors to look similar, and we don’t want one package author to show black text on red background whereas the next package author opts for red text on black background…