Skip to content

Commit

Permalink
LazyString in interpolated error messages in threadingconstructs (#54908
Browse files Browse the repository at this point in the history
)

(cherry picked from commit 36a0da0)
  • Loading branch information
jishnub authored and KristofferC committed Jun 25, 2024
1 parent c3a21a2 commit 30c4d49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/threadingconstructs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function _tpid_to_sym(tpid::Int8)
elseif tpid == -1
return :foreign
else
throw(ArgumentError("Unrecognized threadpool id $tpid"))
throw(ArgumentError(LazyString("Unrecognized threadpool id ", tpid)))
end
end

Expand All @@ -79,7 +79,7 @@ function _sym_to_tpid(tp::Symbol)
elseif tp == :foreign
return Int8(-1)
else
throw(ArgumentError("Unrecognized threadpool name `$(repr(tp))`"))
throw(ArgumentError(LazyString("Unrecognized threadpool name `", tp, "`")))
end
end

Expand Down Expand Up @@ -462,7 +462,7 @@ macro spawn(args...)
if ttype isa QuoteNode
ttype = ttype.value
if ttype !== :interactive && ttype !== :default
throw(ArgumentError("unsupported threadpool in @spawn: $ttype"))
throw(ArgumentError(LazyString("unsupported threadpool in @spawn: ", ttype)))
end
tp = QuoteNode(ttype)
else
Expand Down

0 comments on commit 30c4d49

Please sign in to comment.