From c4d4719bbd50b46f7a938eb1abb9815957b0e13b Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Tue, 21 Nov 2023 03:08:45 +0100 Subject: [PATCH] tweak the error printed for `PrecompileError` to indicate that it doesn't have to be due to `__precompile__(false)` (#51367) --- base/loading.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/loading.jl b/base/loading.jl index ff1a2207a2022..9a3a922298f1e 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -1747,7 +1747,7 @@ end # we throw PrecompilableError when a module doesn't want to be precompiled struct PrecompilableError <: Exception end function show(io::IO, ex::PrecompilableError) - print(io, "Declaring __precompile__(false) is not allowed in files that are being precompiled.") + print(io, "Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.") end precompilableerror(ex::PrecompilableError) = true precompilableerror(ex::WrappedException) = precompilableerror(ex.error)