From 2d82095aa1bad0b91abe413573dea2e05dde7433 Mon Sep 17 00:00:00 2001 From: David Little Date: Fri, 20 Aug 2021 14:36:18 -0400 Subject: [PATCH] fix: graceful REPL injection recovery --- src/Alert.jl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Alert.jl b/src/Alert.jl index 92b61b3..aec06a5 100644 --- a/src/Alert.jl +++ b/src/Alert.jl @@ -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