app
geoconverter.app
¶
showtraceback(widget, msg)
¶
Display error traceback.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
widget |
DefaultTab |
current widget |
required |
msg |
str |
error message to be displayed. |
required |
Source code in geoconverter/app.py
def showtraceback(widget: "DefaultTab", msg: str) -> None:
"""Display error traceback.
Args:
widget (DefaultTab): current widget
msg (str): error message to be displayed.
"""
root: Union[tk.Tk, tk.Toplevel] = widget.winfo_toplevel()
errWindow = tk.Toplevel(root)
errWindow.title("Traceback")
# sets the geometry of toplevel
errWindow.geometry("500x500")
T = tk.Text(errWindow, height=100, width=500)
T.pack()
T.insert(tk.END, msg)
T.configure(state="disabled")