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

Side by Side Diff: gclient_utils.py

Issue 5303002: Add more exception information to breakpad. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: remove upload.py added by error, limit stack length to 4096 Created 10 years 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 | « breakpad.py ('k') | pylintrc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Generic utils.""" 5 """Generic utils."""
6 6
7 import errno 7 import errno
8 import logging 8 import logging
9 import os 9 import os
10 import Queue 10 import Queue
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 logging.info(item.name) 694 logging.info(item.name)
695 self.item = item 695 self.item = item
696 self.index = index 696 self.index = index
697 self.args = args 697 self.args = args
698 self.kwargs = kwargs 698 self.kwargs = kwargs
699 699
700 def run(self): 700 def run(self):
701 """Runs in its own thread.""" 701 """Runs in its own thread."""
702 logging.debug('running(%s)' % self.item.name) 702 logging.debug('running(%s)' % self.item.name)
703 work_queue = self.kwargs['work_queue'] 703 work_queue = self.kwargs['work_queue']
704 # It's necessary to catch all exceptions.
705 # pylint: disable=W0703
706 try: 704 try:
707 self.item.run(*self.args, **self.kwargs) 705 self.item.run(*self.args, **self.kwargs)
708 except Exception: 706 except Exception:
709 # Catch exception location. 707 # Catch exception location.
710 logging.info('Caught exception in thread %s' % self.item.name) 708 logging.info('Caught exception in thread %s' % self.item.name)
711 logging.info(str(sys.exc_info())) 709 logging.info(str(sys.exc_info()))
712 work_queue.exceptions.put(sys.exc_info()) 710 work_queue.exceptions.put(sys.exc_info())
713 logging.info('Task %s done' % self.item.name) 711 logging.info('Task %s done' % self.item.name)
714 712
715 work_queue.ready_cond.acquire() 713 work_queue.ready_cond.acquire()
716 try: 714 try:
717 work_queue.ready_cond.notifyAll() 715 work_queue.ready_cond.notifyAll()
718 finally: 716 finally:
719 work_queue.ready_cond.release() 717 work_queue.ready_cond.release()
OLDNEW
« no previous file with comments | « breakpad.py ('k') | pylintrc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698