forked from python/typeshed
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delete tkinter._ExceptionReportingCallback (python#10689)
Co-authored-by: Alex Waygood <[email protected]>
- Loading branch information
1 parent
c31e12f
commit fbd7963
Showing
2 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from __future__ import annotations | ||
|
||
import tkinter | ||
import traceback | ||
import types | ||
|
||
|
||
def custom_handler(exc: type[BaseException], val: BaseException, tb: types.TracebackType | None) -> None: | ||
print("oh no") | ||
|
||
|
||
root = tkinter.Tk() | ||
root.report_callback_exception = traceback.print_exception | ||
root.report_callback_exception = custom_handler |