Fix verbose BuildError bug. (Anthony Roach)
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 10 Oct 2002 17:41:32 +0000 (17:41 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 10 Oct 2002 17:41:32 +0000 (17:41 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@479 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/CHANGES.txt
src/engine/SCons/Node/__init__.py
test/errors.py

index e227920e8715539763e6003d820bf7c1a2d4c154..265b19e46542343aa472962e9cbb608e3d68dbe6 100644 (file)
@@ -92,6 +92,8 @@ RELEASE 0.09 -
 
   - Add EnsurePythonVersion() and EnsureSConsVersion() functions.
 
+  - Fix the overly-verbose stack trace on ListBuilder build errors.
+
   From sam th:
 
   - Dynamically check for the existence of utilities with which to
index 75a27c0620fbbeff080a8e05ceb1a9d54097e848..22bf949a93bcc68b775957e843955586ccfc8580 100644 (file)
@@ -112,6 +112,8 @@ class Node:
                 raise
             except UserError:
                 raise
+            except BuildError:
+                raise
             except:
                 raise BuildError(self, "Exception",
                                  sys.exc_type,
index 979c6e11368700be8117d5b3fcf0b44e769e80aa..5f780f239586977b6d3907c421dd14fe5cb468d9 100644 (file)
@@ -27,6 +27,9 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
 import TestCmd
 import TestSCons
 import string
+import sys
+
+python = sys.executable
 
 test = TestSCons.TestSCons(match = TestCmd.match_re_dotall)
 
@@ -113,4 +116,16 @@ test.run(arguments='-f SConstruct3',
 InternalError: error inside
 """, status=2)
 
+test.write('build.py', '''
+import sys
+sys.exit(2)
+''')
+
+test.write('SConstruct', """
+env=Environment()
+Default(env.Command(['one.out', 'two.out'], ['foo.in'], action=r'%s build.py'))
+"""%python)
+
+test.run(status=2, stderr="scons: \\*\\*\\* \\[one.out\\] Error 2\n")
+
 test.pass_test()