Skip to main content
Version: V2 (Ignition 8.1)

tamaki.mes.utils.showErrorPopup

Description

Opens the standard TamakiMES/_popups/Error modal popup, passing it the current traceback (traceback.format_exc()) and the string form of the supplied exception. Call this from within an except block so the traceback reflects the error being handled.

Must be run in a Perspective session scope.

Syntax

tamaki.mes.utils.showErrorPopup(exception, popupTitle='Error')

Parameters

ParameterTypeNullableDescription
exceptionExceptionFalseThe caught exception to display.
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

# The common save-handler idiom: surface access-denied nicely, otherwise show the error popup
try:
system.mes.inventory.operation.saveInventoryOperation(**inventoryOperation)
except Exception as e:
if not tamaki.mes.permissions.notifyUserIfPermissionException(e):
tamaki.mes.utils.showErrorPopup(e)
raise e