Skip to content

Commit

Permalink
fix: graceful REPL injection recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
haberdashPI committed Aug 20, 2021
1 parent 434fa9a commit 2d82095
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Alert.jl
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,14 @@ end

function init_alert_REPL!()
if VERSION >= v"1.5"
push!(Base.active_repl_backend.ast_transforms, with_repl_alert)
try
push!(Base.active_repl_backend.ast_transforms, with_repl_alert)
catch e
@error "Unable to load REPL backend for Alert: \n"*
mapreduce(*, Base.catch_stack()) do (e, bt)
sprint(showerror, e, bt)
end
end
end
end

Expand Down

0 comments on commit 2d82095

Please sign in to comment.