Class Node::RESCUE
In: ext/nodeinfo.c
Parent: Node

Represents part of a rescue expression of the form:

  head rescue expr

or the longer form:

  begin
    head
  rescue exception
    expr
  end

or the form using the else keyword:

  begin
    head
  rescue exception
    expr
  else
    else_expr
  end

The head expression is first evaluated, and if an exception is raised, evaluates the resq node. If no exception is raised, the else node is evaluated if it is not false (0).

The resq node will be a RESBDOY node, which will test the exception to see if it matches one of the expected types. If it does it will handle the exception, otherwise it will allow the expression to pass to the outer scope.

Methods

else   head   members   resq  

Public Class methods

Return an array of strings containing the names of the node class‘s members.

Public Instance methods

the expression to be evaluated if no exception is raised

the body of the block to evaluate

the expression to be evaluated if an exception is raised

[Validate]