Skip to content

Commit 53711da

Browse files
throw an error type that doesn't show a stacktrace
1 parent 64de065 commit 53711da

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

base/precompilation.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ struct PkgPrecompileError <: Exception
333333
msg::String
334334
end
335335
Base.showerror(io::IO, err::PkgPrecompileError) = print(io, err.msg)
336+
Base.showerror(io::IO, err::PkgPrecompileError, bt; kw...) = Base.showerror(io, err) # hide stacktrace
337+
336338
# This needs a show method to make `julia> err` show nicely
337339
Base.show(io::IO, err::PkgPrecompileError) = print(io, "PkgPrecompileError: ", err.msg)
338340

@@ -943,7 +945,7 @@ function precompilepkgs(pkgs::Vector{String}=String[];
943945
end
944946
else
945947
println(io)
946-
error(err_msg)
948+
throw(PkgPrecompileError(err_msg))
947949
end
948950
end
949951
end

0 commit comments

Comments
 (0)