use of lucee.transformer.bytecode.visitor.TryFinallyVisitor in project Lucee by lucee.
the class ExpressionUtil method writeOut.
public static void writeOut(final Statement s, BytecodeContext bc) throws TransformerException {
if (ExpressionUtil.doLog(bc)) {
final String id = CreateUniqueId.invoke();
TryFinallyVisitor tfv = new TryFinallyVisitor(new OnFinally() {
@Override
public void _writeOut(BytecodeContext bc) {
ExpressionUtil.callEndLog(bc, s, id);
}
}, null);
tfv.visitTryBegin(bc);
ExpressionUtil.callStartLog(bc, s, id);
s.writeOut(bc);
tfv.visitTryEnd(bc);
} else
s.writeOut(bc);
}
Aggregations