Make error and warning message consistent. (Anthony Roach)
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sat, 14 Dec 2002 03:44:52 +0000 (03:44 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sat, 14 Dec 2002 03:44:52 +0000 (03:44 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@523 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/CHANGES.txt
src/RELEASE.txt
src/engine/SCons/Script/__init__.py
test/SConstruct.py
test/SharedLibrary.py
test/dependency-cycle.py
test/errors.py
test/multi.py
test/option--warn.py
test/sconsign.py

index ee47871bfdb62ec4cbf68794671eb2152b64124e..38fa1a7ece733b863de4807460506ef465faf968 100644 (file)
@@ -22,6 +22,10 @@ RELEASE 0.10 - XXX
   - Convert the .sconsign file format from ASCII to a pickled Python
     data structure.
 
+  - Made consistent the format of error messages (now all start with
+    "scons: ***") and warning messages (now all start with "scons:
+    warning:").
+
 
 
 RELEASE 0.09 - Thu,  5 Dec 2002 04:48:25 -0600
index 15f4ca9f8c44d89481640ffee0535a046a3e442a..60594de229d59846bd9fa3cda207db470ffda3e9 100644 (file)
@@ -38,6 +38,10 @@ RELEASE 0.10 - XXX
       These warnings are normal in this situation and can be safely
       ignored.
 
+    - The format of all error and warning messages has been made
+      consistent.  All error messages now begin with "scons: ***"
+      and all warning messages now begin with "scons: warning:".
+
   Please note the following important changes since release 0.08:
 
     - The SetCommandHandler() function has been superceded
index a0c2f7d11f3e291af8620707c9173bbb99d1689c..c22cd374dc304e9fc20ea6292a3072da89355794 100644 (file)
@@ -111,7 +111,7 @@ class BuildTask(SCons.Taskmaster.Task):
         elif sys.exc_type == UserError:
             # We aren't being called out of a user frame, so
             # don't try to walk the stack, just print the error.
-            sys.stderr.write("\nSCons error: %s\n" % e)
+            sys.stderr.write("\nscons: *** %s\n" % e)
         elif sys.exc_type == StopError:
             s = str(e)
             if not keep_going_on_error:
@@ -239,7 +239,7 @@ def _scons_user_error(e):
     """
     etype, value, tb = sys.exc_info()
     filename, lineno, routine, dummy = find_deepest_user_frame(traceback.extract_tb(tb))
-    sys.stderr.write("\nSCons error: %s\n" % value)
+    sys.stderr.write("\nscons: *** %s\n" % value)
     sys.stderr.write('File "%s", line %d, in %s\n' % (filename, lineno, routine))
     sys.exit(2)
 
@@ -251,7 +251,7 @@ def _scons_user_warning(e):
     """
     etype, value, tb = sys.exc_info()
     filename, lineno, routine, dummy = find_deepest_user_frame(traceback.extract_tb(tb))
-    sys.stderr.write("\nSCons warning: %s\n" % e)
+    sys.stderr.write("\nscons: warning: %s\n" % e)
     sys.stderr.write('File "%s", line %d, in %s\n' % (filename, lineno, routine))
 
 def _scons_internal_warning(e):
@@ -259,7 +259,7 @@ def _scons_internal_warning(e):
     *current call stack* rather than sys.exc_info() to get our stack trace.
     This is used by the warnings framework to print warnings."""
     filename, lineno, routine, dummy = find_deepest_user_frame(traceback.extract_stack())
-    sys.stderr.write("\nSCons warning: %s\n" % e)
+    sys.stderr.write("\nscons: warning: %s\n" % e)
     sys.stderr.write('File "%s", line %d, in %s\n' % (filename, lineno, routine))
 
 def _scons_other_errors():
index 48f2642a9a8b1e964056ce969656541197967a76..538705391a4590a2c8fe2ef0769c44921a3b14c6 100644 (file)
@@ -33,7 +33,7 @@ test.run(arguments = ".",
          status = 2,
          stdout = "",
          stderr = r"""
-SCons error: No SConstruct file found.
+scons: \*\*\* No SConstruct file found.
 File "\S+", line \d+, in \S+
 """)
 
index d54dba4268a60d9576d084f67a4b6c78faf6fdfb..86596372dc9412a48365d976a6e20e64f2955c7a 100644 (file)
@@ -192,12 +192,12 @@ test.run(program = test.workpath('prog'),
          stdout = "f1.c\nf2a.c\nf2b.c\nf2c.c\nf3a.c\nf3b.c\nf3c.c\nprog.c\n")
 
 test.run(arguments = '-f SConstructFoo', status=2, stderr='''
-SCons error: Source file: foo\..* is static and is not compatible with shared target: .*
+scons: \*\*\* Source file: foo\..* is static and is not compatible with shared target: .*
 '''
 )
 
 test.run(arguments = '-f SConstructFoo2', status=2, stderr='''
-SCons error: Source file: bar\..* is shared and is not compatible with static target: .*
+scons: \*\*\* Source file: bar\..* is shared and is not compatible with static target: .*
 '''
 )
 
index 8116a1fd8c5662ab8847c19f652f1aba82b07a91..4e4beef7cba01c3d6e8ebe24140a91be429258ae 100644 (file)
@@ -48,7 +48,7 @@ f1(void)
 """)
 
 test.run(arguments = ".", stderr=r"""
-SCons error: Dependency cycle: .*foo1.* -> .*foo3.* -> .*foo2.* -> .*foo1.* -> \.
+scons: \*\*\* Dependency cycle: .*foo1.* -> .*foo3.* -> .*foo2.* -> .*foo1.* -> \.
 .*
 """, status=2)
 
index 5f780f239586977b6d3907c421dd14fe5cb468d9..17ac8eb5c4aaeb2c9834c806a94078a8029f02c4 100644 (file)
@@ -95,7 +95,7 @@ raise SCons.Errors.UserError, 'Depends() require both sources and targets.'
 test.run(arguments='-f SConstruct2',
         stdout = "scons: Reading SConscript files ...\n",
         stderr = """
-SCons error: Depends\(\) require both sources and targets.
+scons: \*\*\* Depends\(\) require both sources and targets.
 File "SConstruct2", line 4, in \?
 """, status=2)
 
index 79d463e49038db3c839b0d83bfc1211dd8391659..8273ecf1a80fab85e4dd339ca396d82368a63c44 100644 (file)
@@ -64,7 +64,7 @@ env.B(target = 'foo.out', source = 'bar.in')
 test.run(arguments='foo.out', 
          status=2, 
          stderr="""
-SCons error: Multiple ways to build the same target were specified for: foo.out
+scons: *** Multiple ways to build the same target were specified for: foo.out
 File "SConstruct", line 10, in ?
 """)
 
@@ -83,7 +83,7 @@ env.B(target = 'foo.out', source = 'bar.in', foo=2)
 test.run(arguments='foo.out', 
          status=2, 
          stderr="""
-SCons error: Two different sets of overrides were specified for the same target: foo.out
+scons: *** Two different sets of overrides were specified for the same target: foo.out
 File "SConstruct", line 10, in ?
 """)
 
@@ -103,7 +103,7 @@ env2.B(target = 'foo.out', source = 'bar.in')
 test.run(arguments='foo.out', 
          status=2, 
          stderr="""
-SCons error: Two different environments were specified for the same target: foo.out
+scons: *** Two different environments were specified for the same target: foo.out
 File "SConstruct", line 11, in ?
 """)
 
@@ -141,7 +141,7 @@ env.C(target = 'foo.out', source = 'bar.in')
 test.run(arguments='foo.out', 
          status=2, 
          stderr="""
-SCons error: Two different builders (B and C) were specified for the same target: foo.out
+scons: *** Two different builders (B and C) were specified for the same target: foo.out
 File "SConstruct", line 14, in ?
 """)
 
@@ -182,7 +182,7 @@ env.B(target = ['bar.out', 'foo.out'], source = 'bar.in')
 test.run(arguments='foo.out', 
          status=2, 
          stderr="""
-SCons error: Two different target sets have a target in common: bar.out
+scons: *** Two different target sets have a target in common: bar.out
 File "SConstruct", line 11, in ?
 """)
 
@@ -209,7 +209,7 @@ env.B(target = ['bar.out', 'blat.out'], source = 'bar.in')
 test.run(arguments='foo.out', 
          status=2, 
          stderr="""
-SCons error: Two different target sets have a target in common: bar.out
+scons: *** Two different target sets have a target in common: bar.out
 File "SConstruct", line 11, in ?
 """)
 
@@ -229,7 +229,7 @@ env.B(target = 'foo.out', source = 'bar.in')
 test.run(arguments='foo.out', 
          status=2, 
          stderr="""
-SCons error: Two different builders (ListBuilder(B) and B) were specified for the same target: foo.out
+scons: *** Two different builders (ListBuilder(B) and B) were specified for the same target: foo.out
 File "SConstruct", line 11, in ?
 """)
 
index 2471e84c7b6b4004ad7b223ef37c9daac5a2c575..e5660f65dd143a377921bd3037d40b606a598329 100644 (file)
@@ -37,7 +37,7 @@ b=Builder(name='b', action='foo')
 """)
 
 test.run(arguments='.', stderr=r"""
-SCons warning: The use of the 'name' parameter to Builder\(\) is deprecated\.
+scons: warning: The use of the 'name' parameter to Builder\(\) is deprecated\.
 File "SConstruct", line 2, in \?
 """)
 
@@ -46,7 +46,7 @@ test.run(arguments='--warn=no-deprecated .', stderr='')
 test.run(arguments='--warn=no-all .', stderr='')
 
 test.run(arguments='--warn=no-all --warn=deprecated .', stderr=r"""
-SCons warning: The use of the 'name' parameter to Builder\(\) is deprecated\.
+scons: warning: The use of the 'name' parameter to Builder\(\) is deprecated\.
 File "SConstruct", line 2, in \?
 """)
 
@@ -64,19 +64,19 @@ test.write("foo.c","""
 """)
 
 test.run(arguments='--warn=dependency .', stderr=r"""
-SCons warning: No dependency generated for file: not_there\.h \(included from: foo\.c\) \-\- file not found
+scons: warning: No dependency generated for file: not_there\.h \(included from: foo\.c\) \-\- file not found
 File ".+", line \d+, in .+
 """)
 
 test.run(arguments='--warn=all .', stderr=r"""
-SCons warning: No dependency generated for file: not_there\.h \(included from: foo\.c\) \-\- file not found
+scons: warning: No dependency generated for file: not_there\.h \(included from: foo\.c\) \-\- file not found
 File ".+", line \d+, in .+
 """)
 
 test.run(arguments='--warn=all --warn=no-dependency .', stderr="")
 
 test.run(arguments='--warn=no-dependency --warn=all .', stderr=r"""
-SCons warning: No dependency generated for file: not_there\.h \(included from: foo\.c\) \-\- file not found
+scons: warning: No dependency generated for file: not_there\.h \(included from: foo\.c\) \-\- file not found
 File ".+", line \d+, in .+
 """)
 
index ca8792d31f8b77308d7866225627d7ca4fa696c9..5978da3187f41e442be6d143418a738d51e2be2d 100644 (file)
@@ -84,7 +84,7 @@ env.B1(target = 'sub1/foo.out', source = 'foo.in')
 """)
 
 stderr = '''
-SCons warning: Ignoring corrupt .sconsign file: sub1..sconsign
+scons: warning: Ignoring corrupt .sconsign file: sub1..sconsign
 .*
 '''