# Power Table Extension Functions handle exceptions silently

**URL:** <https://forum.inductiveautomation.com/t/power-table-extension-functions-handle-exceptions-silently/42575>\
**Category:** Ignition\
**Created:** [January 25, 2021, 2:40pm UTC](https://forum.inductiveautomation.com/t/power-table-extension-functions-handle-exceptions-silently/42575 "2021-01-25T14:40:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_Bridgeman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dan_bridgeman/32/3610_2.png) [@Dan\_Bridgeman](https://forum.inductiveautomation.com/u/Dan_Bridgeman)\
**Post date:** [January 25, 2021, 2:40pm UTC](https://forum.inductiveautomation.com/t/power-table-extension-functions-handle-exceptions-silently/42575/1 "2021-01-25T14:40:42Z")

</div>

It appears that when the Power Table Extension Functions encounter an exception, they fail silently. They do log the exception and the stack trace to the console, but unless the user is monitoring the console, they will not know that anything went wrong.

The exception can be caught and handled in the script, so I can write in my own pop up for the user. But I don’t know how to generate an errorBox which includes the “report error” that I usually see when an exception is raised in the Vision projects. Is this something that I can write my own function to do, at least until this problem is resolved?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 25, 2021, 5:33pm UTC](https://forum.inductiveautomation.com/t/power-table-extension-functions-handle-exceptions-silently/42575/2 "2021-01-25T17:33:24Z")

</div>

Use `ErrorUtil` - take a look at the various overloads for `showError`, eg:  
[http://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.0/com/inductiveautomation/ignition/client/util/gui/ErrorUtil.html#showError(java.lang.String)](http://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.0/com/inductiveautomation/ignition/client/util/gui/ErrorUtil.html#showError(java.lang.String))

```python
from com.inductiveautomation.ignition.client.util.gui import ErrorUtil
try:
    pass
except java.lang.Exception, e:
    ErrorUtil.showError("Component X threw an uncaught error", e)

```

---

<div class="post-metadata">

**Author:** ![Dan\_Bridgeman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dan_bridgeman/32/3610_2.png) [@Dan\_Bridgeman](https://forum.inductiveautomation.com/u/Dan_Bridgeman)\
**Post date:** [January 25, 2021, 6:15pm UTC](https://forum.inductiveautomation.com/t/power-table-extension-functions-handle-exceptions-silently/42575/3 "2021-01-25T18:15:58Z")

</div>

Thanks, Paul, that will cover most cases. Is there something that will work like this for python Exceptions? Or a simple way to get a java.lang.Throwable out of a python Exception? If not, I suppose we can always handle the two separately.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 25, 2021, 6:29pm UTC](https://forum.inductiveautomation.com/t/power-table-extension-functions-handle-exceptions-silently/42575/4 "2021-01-25T18:29:13Z")

</div>

Copying Phil always works 🙂  
He's got a `PythonAsJavaException` class in his `later.py` utilities package:

> [@A universal way to alert devleopers about errors?](http://forum.inductiveautomation.com/t/a-universal-way-to-alert-devleopers-about-errors/34914/7):
>
> It does not. That’s why you may need separate except clauses for java vs. jython. See my [later.py](https://www.automation-pros.com/ignition/later.py) script module for some hints on how to handle this.

---

<div class="post-metadata">

**Author:** ![Dan\_Bridgeman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dan_bridgeman/32/3610_2.png) [@Dan\_Bridgeman](https://forum.inductiveautomation.com/u/Dan_Bridgeman)\
**Post date:** [January 25, 2021, 6:57pm UTC](https://forum.inductiveautomation.com/t/power-table-extension-functions-handle-exceptions-silently/42575/5 "2021-01-25T18:57:44Z")

</div>

Thanks to you both, that seems to do the trick. At least until Extension Functions can be made to handle this like other component functions do.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 25, 2021, 7:41pm UTC](https://forum.inductiveautomation.com/t/power-table-extension-functions-handle-exceptions-silently/42575/6 "2021-01-25T19:41:10Z")

</div>

> [@paul-griffith](#):
>
> always works

Sigh. I wish. /:
