Bug 1057871 - Print full path of mozconfig file used on 'mach ./configure' when error in mozconfig throws an exception r=gps
authorArnaud Sourioux <six.dsn@gmail.com>
Wed, 03 Sep 2014 12:14:00 +0200
changeset 203500 64300da7c9c4f88f3c6a409b35fd160a61950553
parent 203499 6b7aadc0c72cff147d43080997aa93491fa0b804
child 203501 7bfd030e8fc8b4c8d6f5e004a6f19269e7b1a402
push id27428
push usercbook@mozilla.com
push dateThu, 04 Sep 2014 13:00:04 +0000
treeherdermozilla-central@7bfd030e8fc8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1057871
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1057871 - Print full path of mozconfig file used on 'mach ./configure' when error in mozconfig throws an exception r=gps
python/mozbuild/mozbuild/base.py
--- a/python/mozbuild/mozbuild/base.py
+++ b/python/mozbuild/mozbuild/base.py
@@ -567,16 +567,29 @@ class MachCommandBase(MozbuildObject):
                 'both %s and %s could be object directories. This is '
                 'typically caused by having a mozconfig pointing to a '
                 'different object directory from the current working '
                 'directory. To solve this problem, ensure you do not have a '
                 'default mozconfig in searched paths.' % (e.objdir1,
                     e.objdir2))
             sys.exit(1)
 
+        except MozconfigLoadException as e:
+            print('Error loading mozconfig: ' + e.path)
+            print('')
+            print(e.message)
+            if e.output:
+                print('')
+                print('mozconfig output:')
+                print('')
+                for line in e.output:
+                    print(line)
+
+            sys.exit(1)
+
         MozbuildObject.__init__(self, topsrcdir, context.settings,
             context.log_manager, topobjdir=topobjdir)
 
         self._mach_context = context
 
         # Incur mozconfig processing so we have unified error handling for
         # errors. Otherwise, the exceptions could bubble back to mach's error
         # handler.