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
add tcl_error
  • Loading branch information
arihant2math authored and youknowone committed Mar 23, 2025
commit 768c207c6ad17321bd36a4ddeafa2fb0ca5fd5f0
10 changes: 10 additions & 0 deletions stdlib/src/tkinter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,15 @@ pub(crate) use self::_tkinter::make_module;

#[pymodule]
mod _tkinter {
use crate::vm::VirtualMachine;
use crate::builtins::PyTypeRef;

#[pyattr(once, name = "TclError")]
fn tcl_error(vm: &VirtualMachine) -> PyTypeRef {
vm.ctx.new_exception_type(
"zlib",
"TclError",
Some(vec![vm.ctx.exceptions.exception_type.to_owned()]),
)
}
}