Showing an error in the Ignition Designer

#1

How can I show an error to the user in the Ignition Designer?

Do I need to have a designer context hook, or does having just the gateway hook work?

I have tried using this line:

ErrorUtil.showError("This is an error message");

but that seems to not work and it crashes my module as opposed to actually popping up an error message to the user. I am looking to show something along the lines of this photo:

0 Likes

#2

You will need to send a message from the gateway to the designer, where you’d registered a push listener. The push listener, on the foreground thread, can throw a deliberate exception with a “caused by” passed from the gateway.

0 Likes

#3

Can you be a big more specific?
Maybe some code or something to show how this is done?

Where does the push listener get registered? In the gateway hook?

How do you use the push listener?

0 Likes

#4

https://docs.inductiveautomation.com/pages/viewpage.action?pageId=4065866

I don’t have any code I can share, sorry. But the documented interface is fairly simple. You just subclass the FIlteredPushNotification class, override the receive() method with your handler, and in this case, override the dispatchOnEDT() method.

I already answered this.

1 Like