Skip to content

Commit a0817f9

Browse files
committed
Match BaseException.add_note error message with CPython
1 parent a0adb66 commit a0817f9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/vm/src/exceptions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ impl PyRef<PyBaseException> {
703703

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

708708
notes.borrow_vec_mut().push(note.into());
709709
Ok(())

0 commit comments

Comments
 (0)