# Using Try/Except to Dummy Proof & Check if SQL Tables/Columns Exist

**URL:** <https://forum.inductiveautomation.com/t/using-try-except-to-dummy-proof-check-if-sql-tables-columns-exist/26140>\
**Category:** Ignition\
**Created:** [June 27, 2019, 1:15pm UTC](https://forum.inductiveautomation.com/t/using-try-except-to-dummy-proof-check-if-sql-tables-columns-exist/26140 "2019-06-27T13:15:44Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [June 27, 2019, 1:43pm UTC](https://forum.inductiveautomation.com/t/using-try-except-to-dummy-proof-check-if-sql-tables-columns-exist/26140/4 "2019-06-27T13:43:59Z")

</div>

Ah, missed that. A bare “except” block doesn’t necessarily catch java exceptions. Use a structure like this:

```auto
import java.lang.Exception

try:
    # some code that can throw either java exceptions or python exceptions
except java.lang.Exception, e:
    # Handle the java exception in 'e', possibly using e.cause to drill into the nesting
except Exception, e:
    # Handle the python exception in 'e'. Note that python doesn't need to import its native exception

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/using-try-except-to-dummy-proof-check-if-sql-tables-columns-exist/26140)._
