| 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.