Skip to content

Commit 69747d3

Browse files
committed
Print chunks when failing
1 parent b813b80 commit 69747d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/chunker.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl Chunker {
145145
if builder.contains_flow_op() {
146146
if builder.is_script_buf() && builder.len() == 1 {
147147
num_unclosed_ifs -= builder.num_unclosed_ifs();
148-
println!("[INFO] Removing {:?}", builder.blocks);
148+
println!("[INFO] Removing {:?}", builder);
149149
removed_len += builder.len();
150150
removed_scripts.push(builder);
151151
if num_unclosed_ifs == 0 {
@@ -195,7 +195,7 @@ impl Chunker {
195195

196196
self.call_stack.extend(removed_scripts.into_iter().rev());
197197
assert!(num_unclosed_ifs >= 0, "More OP_ENDIF's than OP_IF's after undo step. (This means there is a bug in the undo logic.)");
198-
assert_eq!(num_unclosed_ifs, 0, "Unable to make up for the OP_IF's in this chunk. Consider a larger target size or more tolerance. Unclosed OP_IF's: {:?}, removed_len: {}, undo.call_stack: {:?}", num_unclosed_ifs, removed_len, undo_info.call_stack);
198+
assert_eq!(num_unclosed_ifs, 0, "Unable to make up for the OP_IF's in this chunk. Consider a larger target size or more tolerance. Unclosed OP_IF's: {:?}, removed_len: {}, undo.call_stack: {:?}, chunks: {:?}", num_unclosed_ifs, removed_len, undo_info.call_stack, self.chunks);
199199
(undo_info.call_stack, removed_len)
200200
}
201201

0 commit comments

Comments
 (0)