diff options
author | Tom Tanner <ttanner2@bloomberg.net> | 2013-10-01 11:18:49 (GMT) |
---|---|---|
committer | Tom Tanner <ttanner2@bloomberg.net> | 2013-10-01 11:18:49 (GMT) |
commit | c9e2d5a843115f68e37c3e0f00c2594f83150f3b (patch) | |
tree | 34d2044e18fbc4bcaefd11d0ed91609ab5bcf47a /src/engine | |
parent | 56875f9b7463ebb9cd1478187d9cd3ca25fd40d2 (diff) | |
download | SCons-c9e2d5a843115f68e37c3e0f00c2594f83150f3b.zip SCons-c9e2d5a843115f68e37c3e0f00c2594f83150f3b.tar.gz SCons-c9e2d5a843115f68e37c3e0f00c2594f83150f3b.tar.bz2 |
Added stack dump on build error
Added message if nothing found to build
Always produce profile stats, no matter what sort of exit
Print message if you drop out with a build error
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/SCons/Script/Main.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index fea0916..9c2e0b9 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -272,6 +272,9 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask): (EnvironmentError, SCons.Errors.StopError, SCons.Errors.UserError))): type, value, trace = buildError.exc_info + if tb and print_stacktrace: + sys.stderr.write("scons: internal stack trace:\n") + traceback.print_tb(tb, file=sys.stderr) traceback.print_exception(type, value, trace) elif tb and print_stacktrace: sys.stderr.write("scons: internal stack trace:\n") @@ -1071,6 +1074,7 @@ def _main(parser): # Build the targets nodes = _build_targets(fs, options, targets, target_top) if not nodes: + print 'Found nothing to build' exit_status = 2 def _build_targets(fs, options, targets, target_top): @@ -1299,12 +1303,8 @@ def _exec_main(parser, values): prof = Profile() try: prof.runcall(_main, parser) - except SConsPrintHelpException, e: + finally: prof.dump_stats(options.profile_file) - raise e - except SystemExit: - pass - prof.dump_stats(options.profile_file) else: _main(parser) @@ -1359,6 +1359,7 @@ def main(): parser.print_help() exit_status = 0 except SCons.Errors.BuildError, e: + print e exit_status = e.exitstatus except: # An exception here is likely a builtin Python exception Python |