# \[Feature-14838\] Capture perspective scripting errors from project

**URL:** <https://forum.inductiveautomation.com/t/feature-14838-capture-perspective-scripting-errors-from-project/36271>\
**Category:** Ignition Early Access\
**Tags:** perspective\
**Created:** [July 1, 2020, 9:15pm UTC](https://forum.inductiveautomation.com/t/feature-14838-capture-perspective-scripting-errors-from-project/36271 "2020-07-01T21:15:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [July 1, 2020, 9:15pm UTC](https://forum.inductiveautomation.com/t/feature-14838-capture-perspective-scripting-errors-from-project/36271/1 "2020-07-01T21:15:14Z")

</div>

A lot of times when scripting in Perspective, I have some kind of error or typo that prevents the script from running (usually on a button click). I have to log into the gateway status screen to see if there are any errors.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/6/f6516b67be319d444f3858fd6ffadc392525a262.png)

Anyway you guys can add a session event that will run and return this error?

---

<div class="post-metadata">

**Author:** ![PerryAJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/perryaj/32/3281_2.png) [@PerryAJ](https://forum.inductiveautomation.com/u/PerryAJ)\
**Post date:** [July 1, 2020, 10:19pm UTC](https://forum.inductiveautomation.com/t/feature-14838-capture-perspective-scripting-errors-from-project/36271/2 "2020-07-01T22:19:09Z")

</div>

Hi Jae,

Better feedback on script erring is a good idea. I’m going to create a ticket and see if we can come up with something, whether it be an action, or something else.

-Perry

---

<div class="post-metadata">

**Author:** ![KMuldoon](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@KMuldoon](https://forum.inductiveautomation.com/u/KMuldoon)\
**Post date:** [July 1, 2020, 10:39pm UTC](https://forum.inductiveautomation.com/t/feature-14838-capture-perspective-scripting-errors-from-project/36271/3 "2020-07-01T22:39:56Z")

</div>

Playing around a bit, (since the system.gui.\* functions aren’t available) I created a parameterized view that takes in the exception message as a param and displays it to the user on an exception. The code you’d use in the button would look like:

```auto
try:
#	Button Functionality Here
	beforeDefined()
except Exception as e:
	system.perspective.openPopup('ExceptionPopup','Error Popup',params = {'Exception':e.message})

```

My view just has a label and disabled textarea. I bound the textarea value to the exception param. It ends up looking like this.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/c/0c0e462927072334f4533ec90d64e454b53c068c.png)
