Skip to content

Commit 4bccbda

Browse files
kevin-yaohighker
authored andcommitted
Add missing DatabaseError definition
1 parent 27b0495 commit 4bccbda

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

prestodb/exceptions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ class PrestoError(Exception):
4040
pass
4141

4242

43+
class DatabaseError(Exception):
44+
pass
45+
46+
4347
class PrestoQueryError(Exception):
4448
def __init__(self, error):
4549
self._error = error

prestodb/transaction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def commit(self):
9595
try:
9696
list(query.execute())
9797
except Exception as err:
98-
raise prestodb.exceptions.DatabaseErrror(
98+
raise prestodb.exceptions.DatabaseError(
9999
'failed to commit transaction {}: {}'.format(self._id, err))
100100

101101
def rollback(self):
@@ -104,5 +104,5 @@ def rollback(self):
104104
try:
105105
list(query.execute())
106106
except Exception as err:
107-
raise prestodb.exceptions.DatabaseErrror(
107+
raise prestodb.exceptions.DatabaseError(
108108
'failed to rollback transaction {}: {}'.format(self._id, err))

0 commit comments

Comments
 (0)