類別 Ractor::RemoteError

如果 Ractor#take 中有未捕捉的例外狀況,則在嘗試時會引發。它的 cause 將包含原始例外狀況,而 ractor 是引發它的原始 ractor。

r = Ractor.new { raise "Something weird happened" }

begin
  r.take
rescue => e
  p e             # => #<Ractor::RemoteError: thrown by remote Ractor.>
  p e.ractor == r # => true
  p e.cause       # => #<RuntimeError: Something weird happened>
end

屬性

ractor[R]