Why not catch the exception in the except block:

```
except Exception as e:
```