Error message in plain text discards visual location information #61
Labels
enhancement
New feature or request
error messages
Better, more actionable diagnostics
pretty printing
When I get a syntax error, the offending characters are highlighted:
In fact, they're... "lowlighted", so that the offending character is dimmer than other code (I can barely see the
8
there), but it's still (de)emphasized.When I copy this error message and paste it as plain text, all formatting is lost, which is expected:
However, nothing visually points at the location of the error anymore: the
8
is no different from other code. Sure, the location is indicated byREPL[17]:2:1
(Does it mean "second line, first character"? Looks more like a "1st line, 6th character" to me...), but the visual is lost. Implementations of other programming languages rely on actual characters (not formatting) to indicate the position of the error.Python draws a "pointer" to the error location, so a plain-text error message still tells me where the error is:
Clang does this too:
Rust's error messages draw around the offending code all the time, which is extremely helpful.
It would be nice to have error messages one could copy & paste without loss of information, especially visual indication of where the error is.
The text was updated successfully, but these errors were encountered: