# Python script Try Except + logging exception

**URL:** <https://forum.inductiveautomation.com/t/python-script-try-except-logging-exception/48160>\
**Category:** Ignition\
**Created:** [June 24, 2021, 2:53pm UTC](https://forum.inductiveautomation.com/t/python-script-try-except-logging-exception/48160 "2021-06-24T14:53:52Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [June 24, 2021, 3:10pm UTC](https://forum.inductiveautomation.com/t/python-script-try-except-logging-exception/48160/3 "2021-06-24T15:10:03Z")

</div>

> [@Catch IOException?](http://forum.inductiveautomation.com/t/catch-ioexception/18612/3):
>
> Consider using two except blocks, as jython’s standard Exception won’t catch pure java exceptions. Like so: import java.lang.Exception try: # something something something except Exception, e: # jython exception except java.lang.Exception, e: # java exception

---

_[View the full topic](https://forum.inductiveautomation.com/t/python-script-try-except-logging-exception/48160)._
