aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-05-31 12:16:04 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-05-31 12:16:04 -0700
commit5fc25b1956b1b01447b900b3c156904f60d59430 (patch)
treea65ae5ef9129a3bbc144680cf055a107fabf62c2
parentb0b7cee27fdb2f8cf75a7355fd880e08e155387c (diff)
print config file when an error occurs
-rw-r--r--tools/shared.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/shared.py b/tools/shared.py
index c8998b5a..f71bec72 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -37,9 +37,10 @@ This command will now exit. When you are done editing those paths, re-run it.
''' % (EM_CONFIG, CONFIG_FILE)
sys.exit(0)
try:
- exec(open(CONFIG_FILE, 'r').read() if CONFIG_FILE else EM_CONFIG)
+ config_text = open(CONFIG_FILE, 'r').read() if CONFIG_FILE else EM_CONFIG
+ exec(config_text)
except Exception, e:
- print >> sys.stderr, 'Error in evaluating %s (at %s): %s' % (EM_CONFIG, CONFIG_FILE, str(e))
+ print >> sys.stderr, 'Error in evaluating %s (at %s): %s, text: %s' % (EM_CONFIG, CONFIG_FILE, str(e), config_text)
sys.exit(1)
# Check that basic stuff we need (a JS engine to compile, Node.js, and Clang and LLVM)