private void compileRescueBodyInternal(Node node, BodyCompiler context, final boolean light) {
final RescueBodyNode rescueBodyNode = (RescueBodyNode) node;
context.loadException();
final Node exceptionList = rescueBodyNode.getExceptionNodes();
ArgumentsCallback rescueArgs = getArgsCallback(exceptionList);
if (rescueArgs == null) rescueArgs = new ArgumentsCallback() {
public int getArity() {
return 1;
}
public void call(BodyCompiler context) {
context.loadStandardError();
}
};
context.checkIsExceptionHandled(rescueArgs);
BranchCallback trueBranch = new BranchCallback() {
public void branch(BodyCompiler context) {
// check if it's an immediate, and don't outline
Node realBody = rescueBodyNode.getBodyNode();
if (realBody instanceof NewlineNode) {
context.setLinePosition(realBody.getPosition());
while (realBody instanceof NewlineNode) {
realBody = ((NewlineNode)realBody).getNextNode();
}
}
if (realBody.getNodeType().isImmediate()) {
compile(realBody, context, true);
context.clearErrorInfo();
} else {
context.storeExceptionInErrorInfo();
if (light) {