Skip to content
Merged
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
Match BaseException.add_note error message with CPython
  • Loading branch information
2jiyong committed Jul 29, 2026
commit a0817f9be2da4e0a7a07efef405e47a1762663ef
2 changes: 1 addition & 1 deletion crates/vm/src/exceptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ impl PyRef<PyBaseException> {

let notes = notes
.downcast::<PyList>()
.map_err(|_| vm.new_type_error("__notes__ must be a list"))?;
.map_err(|_| vm.new_type_error("Cannot add note: __notes__ is not a list"))?;

notes.borrow_vec_mut().push(note.into());
Ok(())
Expand Down