Skip to content

Commit 1b58b76

Browse files
committed
Only catch apsw exceptions
If all exceptions are caught then it swallows fault injection ones
1 parent a73c5d5 commit 1b58b76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def query(sql, bindings=None):
3838
result = connection.execute(sql, bindings).fetchall()
3939
if len(result):
4040
pprint(result[0] if len(result) == 1 else result)
41-
except Exception as exc:
41+
except apsw.Error as exc:
4242
print("Exception:", exc)
4343

4444

0 commit comments

Comments
 (0)