summaryrefslogtreecommitdiff
path: root/numpy/distutils/fcompiler
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/fcompiler
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/fcompiler')
-rw-r--r--numpy/distutils/fcompiler/__init__.py4
-rw-r--r--numpy/distutils/fcompiler/compaq.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/numpy/distutils/fcompiler/__init__.py b/numpy/distutils/fcompiler/__init__.py
index 812461538..d7579e976 100644
--- a/numpy/distutils/fcompiler/__init__.py
+++ b/numpy/distutils/fcompiler/__init__.py
@@ -610,7 +610,7 @@ class FCompiler(CCompiler):
self.spawn(command, display=display)
except DistutilsExecError as e:
msg = str(e)
- raise CompileError(msg)
+ raise CompileError(msg) from None
def module_options(self, module_dirs, module_build_dir):
options = []
@@ -678,7 +678,7 @@ class FCompiler(CCompiler):
self.spawn(command)
except DistutilsExecError as e:
msg = str(e)
- raise LinkError(msg)
+ raise LinkError(msg) from None
else:
log.debug("skipping %s (up-to-date)", output_filename)
diff --git a/numpy/distutils/fcompiler/compaq.py b/numpy/distutils/fcompiler/compaq.py
index 1a356866a..351a43dd7 100644
--- a/numpy/distutils/fcompiler/compaq.py
+++ b/numpy/distutils/fcompiler/compaq.py
@@ -87,11 +87,11 @@ class CompaqVisualFCompiler(FCompiler):
except IOError as e:
if not "vcvarsall.bat" in str(e):
print("Unexpected IOError in", __file__)
- raise e
+ raise
except ValueError as e:
if not "'path'" in str(e):
print("Unexpected ValueError in", __file__)
- raise e
+ raise
executables = {
'version_cmd' : ['<F90>', "/what"],