JuliaSyntax.jl icon indicating copy to clipboard operation
JuliaSyntax.jl copied to clipboard

extra newline after error output in REPL

Open JeffBezanson opened this issue 3 years ago • 2 comments

julia> "a$2"
ERROR: ParseError:
Error: identifier or parenthesized expression expected after $ in string
@ REPL[14]:1:4
"a$2"


julia> 

The error is correct but there is an extra blank line before the next prompt.

JeffBezanson avatar Oct 04 '22 20:10 JeffBezanson

The output would also be much nicer if we can collapse

ERROR: ParseError:
Error: identifier or parenthesized expression expected after $ in string

into a single line, such as

ParseError: identifier or parenthesized expression expected after $ in string

JeffBezanson avatar Oct 04 '22 20:10 JeffBezanson

into a single line, such as

ParseError: identifier or parenthesized expression expected after $ in string

Yes. Though to remove the ERROR: prefix we would have to extend the function Base.display_error and that will be inconsistent with how we report other errors. For example, the "double error" prefix occurs in basic things like

julia> 1÷0
ERROR: DivideError: integer division error
Stacktrace:
...

c42f avatar Oct 07 '22 03:10 c42f

This was fixed some time ago.

c42f avatar May 08 '23 21:05 c42f