Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LazyString in interpolated error messages in threadingconstructs #54908

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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