summaryrefslogtreecommitdiff
path: root/numpy/distutils/unixccompiler.py
diff options
context:
space:
mode:
authorAbhay Raghuvanshi <abhayaman669@gmail.com>2021-03-19 01:49:20 +0530
committerGitHub <noreply@github.com>2021-03-18 14:19:20 -0600
commit9c68c2f7b1b2128a3b4af2134565f60d286fa8b9 (patch)
tree6ce82ac0a4e3074f89b0d2b883d2e02345f90b3d /numpy/distutils/unixccompiler.py
parentbb7a31a6a852ecc64d3f7cffb70121fc8bef20eb (diff)
downloadnumpy-9c68c2f7b1b2128a3b4af2134565f60d286fa8b9.tar.gz
MAINT: Added Chain exceptions where appropriate (#18394)
* Added chain exception in _bits_of func * Added chain exception * Added chain exception in unixccompiler.py * Added chain exception in config.py * Added chain exception in fcompiler __init__.py * Added chain exception in compaq.py * Added chain exception in format.py * Updated raise chain exception * STY: Break long line. Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
Diffstat (limited to 'numpy/distutils/unixccompiler.py')
-rw-r--r--numpy/distutils/unixccompiler.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/distutils/unixccompiler.py b/numpy/distutils/unixccompiler.py
index 0cd2d243e..fb91f1789 100644
--- a/numpy/distutils/unixccompiler.py
+++ b/numpy/distutils/unixccompiler.py
@@ -54,7 +54,7 @@ def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts
extra_postargs, display = display)
except DistutilsExecError as e:
msg = str(e)
- raise CompileError(msg)
+ raise CompileError(msg) from None
# add commandline flags to dependency file
if deps:
@@ -131,7 +131,7 @@ def UnixCCompiler_create_static_lib(self, objects, output_libname,
display = display)
except DistutilsExecError as e:
msg = str(e)
- raise LibError(msg)
+ raise LibError(msg) from None
else:
log.debug("skipping %s (up-to-date)", output_filename)
return