Skip to content

Commit 256abe6

Browse files
committed
Use vm.new_type_error
1 parent 20e0cc8 commit 256abe6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

vm/src/frame.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,9 +1207,7 @@ impl Frame {
12071207
"Can only raise BaseException derived types, not {}",
12081208
exception
12091209
);
1210-
let type_error_type = vm.ctx.exceptions.type_error.clone();
1211-
let type_error = vm.new_exception(type_error_type, msg);
1212-
Err(type_error)
1210+
Err(vm.new_type_error(msg))
12131211
}
12141212
} else {
12151213
Err(vm.new_type_error("exceptions must derive from BaseException".to_string()))

0 commit comments

Comments
 (0)