Class List Method List File List

# Class: Concurrent::Channel::Selector::ErrorClause

Inherits:
  Object
  - Object
  - Concurrent::Channel::Selector::ErrorClause
  show all
Defined in:
  lib/concurrent/channel/selector/error_clause.rb

## Instance Method Summary (collapse)

- - (undocumented) execute(error)
- - (ErrorClause) initialize(block) constructor

  A new instance of ErrorClause.

## Constructor Details

### - (`ErrorClause`) initialize(block)

Returns a new instance of ErrorClause

    7
    8
    9

    # File 'lib/concurrent/channel/selector/error_clause.rb', line 7

    def initialize(block)
      @block = block
    end

## Instance Method Details

### - (`undocumented`) execute(error)

    11
    12
    13
    14
    15
    16
    17

    # File 'lib/concurrent/channel/selector/error_clause.rb', line 11

    def execute(error)
      @block.call(error)
    rescue
      # suppress and move on
    ensure
      return nil
    end