lib/polyphony/core/timer.rb
# Converts a timeout record's exception spec to an exception instance.
#
# @param record [Array, Class, Exception, String] exception spec
# @return [Exception] exception instance
Converts a timeout record's exception spec to an exception instance.
Converts a timeout record ' s exception spec to an exception instance .
def timeout_exception(record)
      case (exception = record[:exception])
      when Array
        exception[0].new(exception[1])
      when Class
        exception.new
      when Exception
        exception
      else
        RuntimeError.new(exception)
      end
    end
def timeout_exception ( record ) case ( exception = record [ :exception ] ) when Array exception [ 0 ] . new ( exception [ 1 ] ) when Class exception . new when Exception exception else RuntimeError . new ( exception ) end end
Converts a timeout record's exception spec to an exception instance.
Converts a timeout record ' s exception spec to an exception instance .
None
Exception
record
None