# Custom Error Message

**URL:** <https://forum.inductiveautomation.com/t/custom-error-message/69296>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [February 1, 2023, 6:10pm UTC](https://forum.inductiveautomation.com/t/custom-error-message/69296 "2023-02-01T18:10:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaleb.s](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kaleb.s](https://forum.inductiveautomation.com/u/kaleb.s)\
**Post date:** [February 1, 2023, 6:10pm UTC](https://forum.inductiveautomation.com/t/custom-error-message/69296/1 "2023-02-01T18:10:35Z")

</div>

How would i go about creating a custom error message in my vision data export? Right now, if you dont choose a file path it pops up the error " Error executing script for event: `actionPerformed`  
on component: `Button`."

Can I add to my script within actionPerformed? If so, can someone provide an example? Thank you.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [February 1, 2023, 6:34pm UTC](https://forum.inductiveautomation.com/t/custom-error-message/69296/2 "2023-02-01T18:34:27Z")

</div>

I'm not sure exactly what you want, but when that error message pops up, there is another tab called `details` which gives more information along with traceback information.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [February 1, 2023, 8:30pm UTC](https://forum.inductiveautomation.com/t/custom-error-message/69296/3 "2023-02-01T20:30:50Z")

</div>

You can handle errors yourself with try/except blocks

```auto
from java.lang import Throwable
try:
   N=1/0
except Throwable:
   #java error
except:
   print "that's infinite, dummy!"

```

---

<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:** [February 1, 2023, 8:37pm UTC](https://forum.inductiveautomation.com/t/custom-error-message/69296/4 "2023-02-01T20:37:55Z")

</div>

> [@kaleb.s](#):
>
> if you dont choose a file path it pops up the error

This usually means you aren't checking for a valid file path after the dialog closes. Please show your code.
