# Being able to get the right error/exception?

**URL:** <https://forum.inductiveautomation.com/t/being-able-to-get-the-right-error-exception/30799>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [December 18, 2019, 3:23pm UTC](https://forum.inductiveautomation.com/t/being-able-to-get-the-right-error-exception/30799 "2019-12-18T15:23:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [December 18, 2019, 3:45pm UTC](https://forum.inductiveautomation.com/t/being-able-to-get-the-right-error-exception/30799/2 "2019-12-18T15:45:07Z")

</div>

> [@Using Try/Except to Dummy Proof & Check if SQL Tables/Columns Exist](http://forum.inductiveautomation.com/t/using-try-except-to-dummy-proof-check-if-sql-tables-columns-exist/26140/4):
>
> Ah, missed that. A bare “except” block doesn’t necessarily catch java exceptions. Use a structure like this: 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/being-able-to-get-the-right-error-exception/30799)._
