showerror
doesn’t seems to work for Meta.parse()
. For example, when i type 5 sin
I get a nice messge.
julia> 5 sin
ERROR: syntax: extra token "sin" after end of expression
But if I type Meta.parse("5 sin")
it doesn’t look so good.
julia> Meta.parse("5 sin")
ERROR: Base.Meta.ParseError("extra token \"sin\" after end of expression")
Is it supposed to be like this?
And how can i convert this error to a nice error string? (I am trying to convert errors to pretty string with sprint(showerror, error)
, and it doesn’t work with Base.Meta.ParseError
)