From 36a0da017f561a240d962e09dac38344c8533c57 Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Mon, 24 Jun 2024 11:22:52 +0530 Subject: [PATCH] LazyString in interpolated error messages in threadingconstructs (#54908) --- base/threadingconstructs.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/threadingconstructs.jl b/base/threadingconstructs.jl index acab7cf7b8299..7212cb664f37e 100644 --- a/base/threadingconstructs.jl +++ b/base/threadingconstructs.jl @@ -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 @@ -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 @@ -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