.comment("restore stack after exception")
.getVariable("output") // TODO: this is quite a strong assumption to make. This code should not be sensitive to whether "output" was on the stack before the call
.comment("return dummy value for null")
.pushJavaDefault(returnType.getJavaType());
return new TryCatch(context, "TRY_CAST", castByteCode, catchBlock, type(Exception.class));
}