# Running Gateway Scripts Query

**URL:** <https://forum.inductiveautomation.com/t/running-gateway-scripts-query/106746>\
**Category:** Ignition\
**Tags:** perspective, ignition81, scripting\
**Created:** [May 27, 2025, 6:46pm UTC](https://forum.inductiveautomation.com/t/running-gateway-scripts-query/106746 "2025-05-27T18:46:39Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [May 27, 2025, 7:06pm UTC](https://forum.inductiveautomation.com/t/running-gateway-scripts-query/106746/3 "2025-05-27T19:06:01Z")

</div>

See this topic:

> [@System.net.sendmail not getting trapped by try except](https://forum.inductiveautomation.com/t/system-net-sendmail-not-getting-trapped-by-try-except/106609):
>
> I have the following code and when I get an error it does not do the except, it crashes and dumps the error message into the wrapper log file. In this case it was an invalid email address, I am now validating every email address, but if I miss something in the error checking, or a server error occurs, or anything else, the script crashes and no further processing occurs and the user has no idea that the email was not sent (doesn't execute WriteToQCAuditFile). Is there any way to trap ALL error…

---

_[View the full topic](https://forum.inductiveautomation.com/t/running-gateway-scripts-query/106746)._
