Skip to main content
Version: V2 (Ignition 8.1)

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​

ParameterTypeNullableDescription
exceptionExceptionFalseThe caught exception (used to capture the traceback).
messageStringFalseA custom message to display alongside the traceback.
popupTitleStringTrueThe 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")