aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-11-15 14:11:42 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-11-15 14:11:42 -0800
commit26b6ce0fc6e8aa2207d2066fb1ecfc84679ca536 (patch)
tree0ee7e08918b7085846e1242a6b5a87f8ddc18a56
parentecb9e4de28fd3de0d51eaf9c45c58587f52ff9db (diff)
parentfffe30f57456015e983f901dffa1364059e4bc49 (diff)
Merge pull request #1816 from juj/fix_test_other_warn_undefined
Fix test other.test_warn_undefined on Windows.
-rw-r--r--src/compiler.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/compiler.js b/src/compiler.js
index e9197a5d..aa3c7b92 100644
--- a/src/compiler.js
+++ b/src/compiler.js
@@ -311,12 +311,16 @@ function compile(raw) {
B = new Benchmarker();
-if (ll_file) {
- if (ll_file.indexOf(String.fromCharCode(10)) == -1) {
- compile(read(ll_file));
- } else {
- compile(ll_file); // we are given raw .ll
+try {
+ if (ll_file) {
+ if (ll_file.indexOf(String.fromCharCode(10)) == -1) {
+ compile(read(ll_file));
+ } else {
+ compile(ll_file); // we are given raw .ll
+ }
}
+} catch(err) {
+ printErr('aborting from js compiler due to exception: ' + err);
}
//var M = keys(tokenCacheMisses).map(function(m) { return [m, misses[m]] }).sort(function(a, b) { return a[1] - b[1] });