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)
| 22076 | showing_error = False # used to stop recursive calls |
| 22077 | |
| 22078 | def 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 | |
| 22098 | def _error_popup_with_traceback(title, *args, emoji=None): |
no test coverage detected