bughelp wanted
Description
I've seen a few code snippets like this:
// todo: emit a diagnostic messsage
throw new FatalError();
This is problematic for two reasons:
- User doesn't get any useful feedback.
- Worse, on the command-line it will show up as an internal error, because there must not be a
FatalErrorwithout aCompilerDiagnosticthingy having been issued.
Concrete work items:
- Review all places in the code where a
FatalErroris thrown, and make sure that a correspondingCompilerDiagnosticthingy was issued before. - Rethink best practices, as it is too easy to create mismatches between
FatalErrorandCompilerDiagnostic(how did this get past code review?).