Skip to content

Commit

Permalink
[REPL] handle failure of edit call gracefully (JuliaLang#43690)
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash authored and LilithHafner committed Mar 8, 2022
1 parent 2c541ac commit b3db42c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion stdlib/REPL/src/REPL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,12 @@ function setup_interface(
if n <= 0 || n > length(linfos) || startswith(linfos[n][1], "REPL[")
@goto writeback
end
InteractiveUtils.edit(linfos[n][1], linfos[n][2])
try
InteractiveUtils.edit(linfos[n][1], linfos[n][2])
catch ex
ex isa ProcessFailedException || ex isa Base.IOError || ex isa SystemError || rethrow()
@info "edit failed" _exception=ex
end
LineEdit.refresh_line(s)
return
@label writeback
Expand Down

0 comments on commit b3db42c

Please sign in to comment.