Skip to content

Commit 36a0da0

Browse files
authored
LazyString in interpolated error messages in threadingconstructs (JuliaLang#54908)
1 parent f846b89 commit 36a0da0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

base/threadingconstructs.jl

+3-3
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 `$tp`"))
82+
throw(ArgumentError(LazyString("Unrecognized threadpool name `", tp, "`")))
8383
end
8484
end
8585

@@ -464,7 +464,7 @@ macro spawn(args...)
464464
if ttype isa QuoteNode
465465
ttype = ttype.value
466466
if ttype !== :interactive && ttype !== :default
467-
throw(ArgumentError("unsupported threadpool in @spawn: $ttype"))
467+
throw(ArgumentError(LazyString("unsupported threadpool in @spawn: ", ttype)))
468468
end
469469
tp = QuoteNode(ttype)
470470
else

0 commit comments

Comments
 (0)