package org.shedlang.compiler.patio.instructions; import org.shedlang.compiler.patio.operands.PatioLocalRef; import org.shedlang.compiler.sources.Source; import java.util.List; /// Push an exception handler with the given catch clauses onto the control flow /// stack, and then execute the instructions in its body. /// /// If the exception handler catches an exception, the body of the corresponding /// is executed instead. /// /// Each block (that is, the body of the try and the body of each catch clause) /// must have the same number of results as destinations. Each result is assigned to /// the destination with the same index. public record PatioTry( List destinations, List catchClauses, PatioBlock body, Source source ) implements PatioInstruction { @Override public boolean isBlockTerminator() { return false; } }