Skip to content

Commit

Permalink
stop swallowing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Aug 15, 2023
1 parent 46b7eef commit ac29b4e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/API.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1270,6 +1270,9 @@ function precompile(ctx::Context, pkgs::Vector{PackageSpec}; internal_call::Bool
println(io, " Interrupted: Exiting precompilation...")
end
interrupted = true
return true
else
return false
end
end

Expand Down Expand Up @@ -1384,7 +1387,7 @@ function precompile(ctx::Context, pkgs::Vector{PackageSpec}; internal_call::Bool
wait(t)
end
catch err
handle_interrupt(err, true)
handle_interrupt(err, true) || rethrow()
finally
fancyprint && print(io, ansi_enablecursor)
end
Expand Down Expand Up @@ -1492,7 +1495,7 @@ function precompile(ctx::Context, pkgs::Vector{PackageSpec}; internal_call::Bool
n_done += 1
notify(was_processed[pkg])
catch err_outer
handle_interrupt(err_outer)
handle_interrupt(err_outer) || rethrow()
notify(was_processed[pkg])
finally
filter!(!istaskdone, tasks)
Expand All @@ -1505,7 +1508,7 @@ function precompile(ctx::Context, pkgs::Vector{PackageSpec}; internal_call::Bool
try
wait(interrupted_or_done)
catch err
handle_interrupt(err)
handle_interrupt(err) || rethrow()
finally
Base.LOADING_CACHE[] = nothing
end
Expand Down

0 comments on commit ac29b4e

Please sign in to comment.