Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: isolate.py

Issue 51383003: Report all swarming and isolate fatal errors in a consistent way. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | isolateserver.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Front end tool to operate on .isolate files. 6 """Front end tool to operate on .isolate files.
7 7
8 This includes creating, merging or compiling them to generate a .isolated file. 8 This includes creating, merging or compiling them to generate a .isolated file.
9 9
10 See more information at 10 See more information at
(...skipping 2433 matching lines...) Expand 10 before | Expand all | Expand 10 after
2444 2444
2445 return options, args 2445 return options, args
2446 2446
2447 2447
2448 def main(argv): 2448 def main(argv):
2449 dispatcher = subcommand.CommandDispatcher(__name__) 2449 dispatcher = subcommand.CommandDispatcher(__name__)
2450 try: 2450 try:
2451 return dispatcher.execute(OptionParserIsolate(version=__version__), argv) 2451 return dispatcher.execute(OptionParserIsolate(version=__version__), argv)
2452 except ( 2452 except (
2453 ExecutionError, 2453 ExecutionError,
2454 IOError,
2454 isolateserver.ConfigError, 2455 isolateserver.ConfigError,
2455 isolateserver.MappingError) as e: 2456 isolateserver.MappingError) as e:
2456 sys.stderr.write('\nError: ') 2457 tools.report_error(str(e), include_traceback=True)
M-A Ruel 2013/10/29 22:42:50 You may want to handle anything then? E.g. "except
2457 sys.stderr.write(str(e))
2458 sys.stderr.write('\n')
2459 return 1 2458 return 1
2460 2459
2461 2460
2462 if __name__ == '__main__': 2461 if __name__ == '__main__':
2463 fix_encoding.fix_encoding() 2462 fix_encoding.fix_encoding()
2464 tools.disable_buffering() 2463 tools.disable_buffering()
2465 colorama.init() 2464 colorama.init()
2466 sys.exit(main(sys.argv[1:])) 2465 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | isolateserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698