class Ractor::RemoteError
当尝试使用 Ractor#take
时,如果在 Ractor
中存在未捕获的异常,则会引发此异常。它的 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]