# Import not Work

**URL:** <https://forum.inductiveautomation.com/t/import-not-work/24063>\
**Category:** Ignition\
**Created:** [April 11, 2019, 7:54pm UTC](https://forum.inductiveautomation.com/t/import-not-work/24063 "2019-04-11T19:54:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Russell.Charchuk](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@Russell.Charchuk](https://forum.inductiveautomation.com/u/Russell.Charchuk)\
**Post date:** [April 11, 2019, 7:54pm UTC](https://forum.inductiveautomation.com/t/import-not-work/24063/1 "2019-04-11T19:54:56Z")

</div>

Why don’t Exception handlers catch exceptions???

try

…  
system.db.runPrepUpdate(… This fails and the whole script stops running

except Exception, e:  
Never reach this line of code!!! Why not???

Thanks,  
Russ

.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 11, 2019, 8:31pm UTC](https://forum.inductiveautomation.com/t/import-not-work/24063/2 "2019-04-11T20:31:46Z")

</div>

Jython’s Exception class does not inherit from Java’s base exception class - so exceptions thrown in Java code (ie, everything written by Inductive Automation) are not caught by Exception clauses. You have to catch both possible exceptions:

```auto
import java.lang.Exception

try:
    # something something something
except Exception, e:
    # jython exception
except java.lang.Exception, e:

```

or

```auto
import java.lang.Exception

try:
    # something something something
except (Exception, java.lang.Exception), e:
	#pass

```

---

<div class="post-metadata">

**Author:** ![Russell.Charchuk](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@Russell.Charchuk](https://forum.inductiveautomation.com/u/Russell.Charchuk)\
**Post date:** [April 11, 2019, 8:34pm UTC](https://forum.inductiveautomation.com/t/import-not-work/24063/3 "2019-04-11T20:34:02Z")

</div>

Thank you sir! I was explaining to others here how Exception (as the base class of all Exceptions) should catch everything…wrong base class!!
