summaryrefslogtreecommitdiffstats
path: root/tools/grit
diff options
context:
space:
mode:
authorrhashimoto@chromium.org <rhashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-05 17:04:37 +0000
committerrhashimoto@chromium.org <rhashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-05 17:04:37 +0000
commit206d87fa6fb6342be364b02874b4af0899164f0d (patch)
tree34924cdbd068ff649c9a6e0c9026883efb433500 /tools/grit
parent9c16051c8b721ef81ded80e618020957133491ab (diff)
downloadchromium_src-206d87fa6fb6342be364b02874b4af0899164f0d.zip
chromium_src-206d87fa6fb6342be364b02874b4af0899164f0d.tar.gz
chromium_src-206d87fa6fb6342be364b02874b4af0899164f0d.tar.bz2
Print a grit debugging hint to stdout when a parse exception occurs
to help with locating the error in the .grd file. BUG=none TEST=none Review URL: http://codereview.chromium.org/6760030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80470 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/grit')
-rw-r--r--tools/grit/grit/grd_reader.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/grit/grit/grd_reader.py b/tools/grit/grit/grd_reader.py
index d4fe0f7..82d06d9 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'):