summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/result.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-04-18 11:00:12 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-04-18 11:00:12 -0400
commit0bb05ffdf066ba108883a0a4165cb11894fb3d88 (patch)
treed43edaf796cfb5a4853e8832db6f0e429deb9c5d /lib/sqlalchemy/engine/result.py
parente5d0592180a554a1220985d28dab8533030281f0 (diff)
downloadsqlalchemy-0bb05ffdf066ba108883a0a4165cb11894fb3d88.tar.gz
Reworked internal exception raises that emit
a rollback() before re-raising, so that the stack trace is preserved from sys.exc_info() before entering the rollback. This so that the traceback is preserved when using coroutine frameworks which may have switched contexts before the rollback function returns. [ticket:2703]
Diffstat (limited to 'lib/sqlalchemy/engine/result.py')
-rw-r--r--lib/sqlalchemy/engine/result.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/sqlalchemy/engine/result.py b/lib/sqlalchemy/engine/result.py
index 1c148e1f0..88930081e 100644
--- a/lib/sqlalchemy/engine/result.py
+++ b/lib/sqlalchemy/engine/result.py
@@ -443,7 +443,6 @@ class ResultProxy(object):
except Exception, e:
self.connection._handle_dbapi_exception(
e, None, None, self.cursor, self.context)
- raise
@property
def lastrowid(self):
@@ -467,7 +466,6 @@ class ResultProxy(object):
self.connection._handle_dbapi_exception(
e, None, None,
self._saved_cursor, self.context)
- raise
@property
def returns_rows(self):
@@ -752,7 +750,6 @@ class ResultProxy(object):
self.connection._handle_dbapi_exception(
e, None, None,
self.cursor, self.context)
- raise
def fetchmany(self, size=None):
"""Fetch many rows, just like DB-API
@@ -772,7 +769,6 @@ class ResultProxy(object):
self.connection._handle_dbapi_exception(
e, None, None,
self.cursor, self.context)
- raise
def fetchone(self):
"""Fetch one row, just like DB-API ``cursor.fetchone()``.
@@ -792,7 +788,6 @@ class ResultProxy(object):
self.connection._handle_dbapi_exception(
e, None, None,
self.cursor, self.context)
- raise
def first(self):
"""Fetch the first row and then close the result set unconditionally.
@@ -809,7 +804,6 @@ class ResultProxy(object):
self.connection._handle_dbapi_exception(
e, None, None,
self.cursor, self.context)
- raise
try:
if row is not None: