summaryrefslogtreecommitdiff
path: root/numpy/core/records.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2019-12-03 14:01:34 +0000
committerEric Wieser <wieser.eric@gmail.com>2019-12-03 14:03:17 +0000
commit5f5a87a6de74bb61e145ca89adea3c5cfe037f13 (patch)
treeb0f8a3f08093dc1c3e7bb883caca53460856f818 /numpy/core/records.py
parentb83f10ef7ee766bf30ccfa563b6cc8f7fd38a4c8 (diff)
downloadnumpy-5f5a87a6de74bb61e145ca89adea3c5cfe037f13.tar.gz
BUG: Exceptions tracebacks are dropped
For some reason this code reconstructed brand new exception objects with no traceback, rather than just re-raising
Diffstat (limited to 'numpy/core/records.py')
-rw-r--r--numpy/core/records.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/core/records.py b/numpy/core/records.py
index a1439f9df..a1cad9075 100644
--- a/numpy/core/records.py
+++ b/numpy/core/records.py
@@ -496,8 +496,7 @@ class recarray(ndarray):
except Exception:
fielddict = ndarray.__getattribute__(self, 'dtype').fields or {}
if attr not in fielddict:
- exctype, value = sys.exc_info()[:2]
- raise exctype(value)
+ raise
else:
fielddict = ndarray.__getattribute__(self, 'dtype').fields or {}
if attr not in fielddict: