class Ractor::RemoteError - Documentation for Ruby 4.0
Description: class Ractor::RemoteError: Raised on Ractor#join or Ractor#value if there was an uncaught exception in the Ractor. Its +cause+ will contain the original exception, and +ractor+
Keywords: ruby,class,Ractor::RemoteError

🔍

No recent searches

# class Ractor::RemoteError

Raised on `Ractor#join` or `Ractor#value` if there was an uncaught exception in the `Ractor`. Its `cause` will contain the original exception, and `ractor` is the original ractor it was raised in.

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

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

### Attributes

ractor [R]

The `Ractor` in which the uncaught exception was raised.