# New Ticket Created by  Zefram 
# Please include the string:  [perl #130876]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=130876 >


> say "a"; "a" + 2; say "b"
a
> "a" + 2
Cannot convert string to number: base-10 number must begin with valid digits or 
'.' in '^a' (indicated by ^)
  in block <unit> at <unknown file> line 1

In both of these cases the addition signals an exception, terminating
the evaluation phase of the repl.  But the exception is only reported in
the second case.  The behaviour in the first case, with the exception
going unreported, is quite confusing in any case less obvious than
this example.  The criterion determining whether the exception gets
reported is whether the evaluation has sent anything to the output stream.
This is obviously the same logic that's being used to suppress printing
the result of evaluation: it's OK to suppress that, but silly to also
suppress error reports.

-zefram

Reply via email to