MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / popup_error_with_traceback

Function popup_error_with_traceback

PySimpleGUI/PySimpleGUI.py:22078–22095  ·  view source on GitHub ↗

Show an error message and as many additoinal lines of messages as you want. Will show the same error window as PySimpleGUI uses internally. Has a button to take the user to the line of code you called this popup from. If you include the Exception information in your messages, then

(title, *messages, emoji=None)

Source from the content-addressed store, hash-verified

22076 showing_error = False # used to stop recursive calls
22077
22078def popup_error_with_traceback(title, *messages, emoji=None):
22079 """
22080 Show an error message and as many additoinal lines of messages as you want.
22081 Will show the same error window as PySimpleGUI uses internally. Has a button to
22082 take the user to the line of code you called this popup from.
22083 If you include the Exception information in your messages, then it will be parsed and additional information
22084 will be in the window about such as the specific line the error itself occurred on.
22085
22086 :param title: The title that will be shown in the popup's titlebar and in the first line of the window
22087 :type title: str
22088 :param *messages: A variable number of lines of messages you wish to show your user
22089 :type *messages: Any
22090 :param emoji: An optional BASE64 Encoded image to shows in the error window. If set to '' (empty string) then no emoji will be shown
22091 :type emoji: bytes | str
22092 """
22093
22094 # For now, call the function that PySimpleGUI uses internally
22095 _error_popup_with_traceback(str(title), *messages, emoji=emoji)
22096
22097
22098def _error_popup_with_traceback(title, *args, emoji=None):

Callers 8

add_rowMethod · 0.85
_readMethod · 0.85
timer_startMethod · 0.85
_widget_set_fg_colorFunction · 0.85
_widget_set_bg_colorFunction · 0.85
theme_globalFunction · 0.85

Calls 1

Tested by

no test coverage detected