tamaki.mes.utils.showErrorPopupWithMessage
Description
Opens the standard TamakiMES/_popups/Error modal popup showing both the current traceback
(traceback.format_exc()) and a custom message. This combines the behaviour of
showErrorPopup (which shows the exception) and
showErrorPopupMessage (which shows a custom message): the message text
is shown alongside the captured stack trace. Call it from within an except block.
Must be run in a Perspective session scope.
Syntax
tamaki.mes.utils.showErrorPopupWithMessage(exception, message, popupTitle="Error")
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
exception | Exception | False | The caught exception (used to capture the traceback). |
message | String | False | A custom message to display alongside the traceback. |
popupTitle | String | True | The popup window title. Defaults to "Error". |
Returns
This method does not return a value. It opens the Error popup as a side effect.
Code Examples
try:
system.mes.location.saveLocation(**location)
except Exception as e:
tamaki.mes.utils.showErrorPopupWithMessage(e, "Could not save the location. Please try again.", "Save Failed")