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

Unified Diff: tools/grit/grit/grd_reader.py

Issue 6760030: Print a grit debugging hint to stdout when a parse exception occurs (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updated copyright year. Created 9 years, 9 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: tools/grit/grit/grd_reader.py
diff --git a/tools/grit/grit/grd_reader.py b/tools/grit/grit/grd_reader.py
index d4fe0f7744e0eb5ae4ed73542435637637189076..82d06d9d8224cc53c137e91b5e26581f6024a8c8 100644
--- a/tools/grit/grit/grd_reader.py
+++ b/tools/grit/grit/grd_reader.py
@@ -1,5 +1,5 @@
#!/usr/bin/python2.4
-# Copyright (c) 2010 The Chromium Authors. All rights reserved.
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -134,6 +134,8 @@ def Parse(filename_or_stream, dir=None, flexible_root=False,
assert stop_after
pass
except:
+ if not debug:
+ print "parse exception: run GRIT with the -x flag to debug .grd problems"
raise
if not flexible_root or hasattr(handler.root, 'SetOwnDir'):
« 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