Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix compile
  • Loading branch information
arihant2math committed Apr 6, 2025
commit a3c76ac1115b0aa18dbb47ad920bf42eec8a2ca1
7 changes: 3 additions & 4 deletions vm/src/exceptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ impl VirtualMachine {
|| previous_name != tb.frame.code.obj_name.as_str()
{
if repeat_counter > TRACEBACK_RECURSIVE_CUTOFF {
write_repeat_traceback_entry(output, &tb, repeat_counter)?;
write_repeat_traceback_entry(output, repeat_counter)?;
}
previous_file = tb.frame.code.source_path.as_str().to_string();
previous_line = tb.lineno.get();
Expand All @@ -167,7 +167,7 @@ impl VirtualMachine {
}
}
if repeat_counter > TRACEBACK_RECURSIVE_CUTOFF {
write_repeat_traceback_entry(output, &tb_list[0], repeat_counter)?;
write_repeat_traceback_entry(output, repeat_counter)?;
}
}

Expand Down Expand Up @@ -407,7 +407,7 @@ fn write_traceback_entry<W: Write>(
writeln!(
output,
r##" File "{}", line {}, in {}"##,
filename.trim_start_matches(r"\\?\"),
filename,
tb_entry.lineno,
tb_entry.frame.code.obj_name
)?;
Expand All @@ -418,7 +418,6 @@ fn write_traceback_entry<W: Write>(

fn write_repeat_traceback_entry<W: Write>(
output: &mut W,
tb_entry: &PyTracebackRef,
repeat_counter: usize,
) -> Result<(), W::Error> {
let count = repeat_counter - TRACEBACK_RECURSIVE_CUTOFF;
Expand Down