Bug 920703 - Give an informative error message when expandlibs_exec fails. r=glandium
authorChris Jones <cjones.bugs@gmail.com>
Thu, 26 Sep 2013 10:11:38 -0400
changeset 148809 9029aa5d60da5446f9a5fd0fd5070042a43e4e83
parent 148808 5a2bfaac8236615d6c53a54c1397bc4c6ae1c796
child 148810 91a3ab6c0d0a4bf37a49fd44982e3a180b9852fe
push idunknown
push userunknown
push dateunknown
reviewersglandium
bugs920703
milestone27.0a1
Bug 920703 - Give an informative error message when expandlibs_exec fails. r=glandium
config/expandlibs_exec.py
js/src/config/expandlibs_exec.py
--- a/config/expandlibs_exec.py
+++ b/config/expandlibs_exec.py
@@ -313,17 +313,21 @@ def main():
             args.extract()
         if options.symbol_order:
             args.orderSymbols(options.symbol_order)
         if options.uselist:
             args.makelist()
 
         if options.verbose:
             print_command(sys.stderr, args)
-        proc = subprocess.Popen(args, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
+        try:
+            proc = subprocess.Popen(args, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
+        except Exception, e:
+            print >>sys.stderr, 'error: Launching', args, ':', e
+            raise e
         (stdout, stderr) = proc.communicate()
         if proc.returncode and not options.verbose:
             print_command(sys.stderr, args)
         sys.stderr.write(stdout)
         sys.stderr.flush()
         if proc.returncode:
             exit(proc.returncode)
     if not options.depend:
--- a/js/src/config/expandlibs_exec.py
+++ b/js/src/config/expandlibs_exec.py
@@ -313,17 +313,21 @@ def main():
             args.extract()
         if options.symbol_order:
             args.orderSymbols(options.symbol_order)
         if options.uselist:
             args.makelist()
 
         if options.verbose:
             print_command(sys.stderr, args)
-        proc = subprocess.Popen(args, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
+        try:
+            proc = subprocess.Popen(args, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
+        except Exception, e:
+            print >>sys.stderr, 'error: Launching', args, ':', e
+            raise e
         (stdout, stderr) = proc.communicate()
         if proc.returncode and not options.verbose:
             print_command(sys.stderr, args)
         sys.stderr.write(stdout)
         sys.stderr.flush()
         if proc.returncode:
             exit(proc.returncode)
     if not options.depend: