Ignition 8.0.16
I’m not totally sure if I’m doing this the correct way however here we go.
I’ve got a footer dock that I’m using to signal to the user when an exception occurs. I open that dock in a try/except block. Basically I’m showing a small information about the error, and then I have a link on that dock to pass the exception to another view that would display the entire exception stack trace. This is all wrapped up in a script to handle this.
def showErrorDock(message,exception):
import system.perspective
dockId = 'dockFooterError'
system.perspective.openDock(
id = dockId,
params = {
'dockId':dockId,
'message':message,
'exception':exception
}
)
I’m calling this in a test like this:
try:
i = 1/0
except Exception, e:
docks.showErrorDock(message = 'Testing Error Dock',exception = e)
I’m getting an error in the gateway:
Error running action 'dom.onClick' on Pages/Home@C/root/FlexContainer/FlexContainer_0/Label_2: Traceback (most recent call last): File "<function:runAction>", line 5, in runAction File "<module:docks>", line 4, in showErrorDock TypeError: object of type 'exceptions.ZeroDivisionError' has no len()
So I think this is happening when the data is passed out to the error page view. Any ideas on how to make this happen? Do I need to wrap the exception in another data-type to effectively pass it along?