# Catch IOException?

**URL:** <https://forum.inductiveautomation.com/t/catch-ioexception/18612>\
**Category:** Ignition\
**Created:** [June 25, 2018, 4:48pm UTC](https://forum.inductiveautomation.com/t/catch-ioexception/18612 "2018-06-25T16:48:35Z")\
**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:** [June 28, 2018, 5:55pm UTC](https://forum.inductiveautomation.com/t/catch-ioexception/18612/3 "2018-06-28T17:55:35Z")

</div>

Consider using two except blocks, as jython's standard `Exception` won't catch pure java exceptions. Like so:

```python
import java.lang.Exception

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

```

Update:

For better coverage and less chance of name conflict, I've been recommending this construct lately:

```python
from java.lang import Throwable

try:
    # something something something
except Throwable, t:
    # Java exception handling
except Exception, e:
    # Jython exception handling

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/catch-ioexception/18612)._
