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

Unified Diff: gcl.py

Issue 3493005: Shallow HTTPError exceptions so they aren't logged in breakpad. (Closed)
Patch Set: Only for http 500 Created 10 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcl.py
diff --git a/gcl.py b/gcl.py
index 0f4712e47cfec9768a9a80db699afdcf6b9f744b..44aa0f03f4b03809d7b21d38c93f57a5c057cc02 100755
--- a/gcl.py
+++ b/gcl.py
@@ -1308,7 +1308,7 @@ def main(argv):
try:
GetRepositoryRoot()
except gclient_utils.Error:
- print('To use gcl, you need to be in a subversion checkout.')
+ print >> sys.stderr, 'To use gcl, you need to be in a subversion checkout.'
return 1
# Create the directories where we store information about changelists if it
@@ -1326,8 +1326,17 @@ def main(argv):
# Unknown command, try to pass that to svn
return CMDpassthru(argv)
except gclient_utils.Error, e:
- print('Got an exception')
- print(str(e))
+ print >> sys.stderr, 'Got an exception'
+ print >> sys.stderr, str(e)
+ return 1
+ except urllib2.HTTPError, e:
+ if e.code != 500:
+ raise
+ print >> sys.stderr, (
+ 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith '
+ 'and retry or visit go/isgaeup.\n%s') % (e.code, e.reason)
+ return 1
+
if __name__ == "__main__":
sys.exit(main(sys.argv[1:]))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698