Skip to content

Commit 30c4d49

Browse files
jishnubKristofferC
authored andcommitted
LazyString in interpolated error messages in threadingconstructs (#54908)
(cherry picked from commit 36a0da0)
1 parent c3a21a2 commit 30c4d49

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

base/threadingconstructs.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function _tpid_to_sym(tpid::Int8)
6767
elseif tpid == -1
6868
return :foreign
6969
else
70-
throw(ArgumentError("Unrecognized threadpool id $tpid"))
70+
throw(ArgumentError(LazyString("Unrecognized threadpool id ", tpid)))
7171
end
7272
end
7373

@@ -79,7 +79,7 @@ function _sym_to_tpid(tp::Symbol)
7979
elseif tp == :foreign
8080
return Int8(-1)
8181
else
82-
throw(ArgumentError("Unrecognized threadpool name `$(repr(tp))`"))
82+
throw(ArgumentError(LazyString("Unrecognized threadpool name `", tp, "`")))
8383
end
8484
end
8585

@@ -462,7 +462,7 @@ macro spawn(args...)
462462
if ttype isa QuoteNode
463463
ttype = ttype.value
464464
if ttype !== :interactive && ttype !== :default
465-
throw(ArgumentError("unsupported threadpool in @spawn: $ttype"))
465+
throw(ArgumentError(LazyString("unsupported threadpool in @spawn: ", ttype)))
466466
end
467467
tp = QuoteNode(ttype)
468468
else

0 commit comments

Comments
 (0)