Skip to content

Commit

Permalink
LazyString in interpolated error messages in threadingconstructs (#54908
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jishnub authored Jun 24, 2024
1 parent f846b89 commit 36a0da0
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 `$tp`"))
throw(ArgumentError(LazyString("Unrecognized threadpool name `", tp, "`")))
end
end

Expand Down Expand Up @@ -464,7 +464,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 36a0da0

Please sign in to comment.