How to display defined exception message as dialog

I write code of the exception handling for any cases.
I want to display my defined exception message as dialog.

Are there any ways to realize this such as the below?

If I remember right from other posts, the OK button is not reachable.

You can use a combination of html <> and string to achieve that look. On the daemon side, you have to create a exception catch.

something like this:

try:
myVar
except TypeError, exc:
ERR_temp=“def Fault():\n”+" popup("<html> java.lang.Error:…<br> …, title=\“Unhadle…”, error=True, blocking=True)"+"\n"+"\nend\n"

or something similar on the swing side:
try {
myVar
} catch (NullPointerException e) {
ERR_temp=“def Fault():\n”+" popup("<html> java.lang.Error:…<br> …, title=\“Unhadle…”, error=True, blocking=True)"+"\n"+"\nend\n"

}

1 Like

Thank you for your advice.
I will try this.