aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2015-02-13 13:41:41 +0100
committerPetter Reinholdtsen <pere@hungry.com>2015-02-13 13:41:41 +0100
commit19e5d127a3589a5c4bdfad8ed6f852d46b7901da (patch)
tree2d5e444730b92b256e9cf7d0e7681acc0296f33a
parentc19c049204d6480ab59e3ee10494c701a2cf6c38 (diff)
Avoid error messages messing up the JSON string.
-rw-r--r--netsniff.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/netsniff.js b/netsniff.js
index 6884452..78dcdf2 100644
--- a/netsniff.js
+++ b/netsniff.js
@@ -144,4 +144,6 @@ if (system.args.length === 1) {
phantom.exit();
}
});
+ // Avoid error strings before the JSON string.
+ page.onError = function(msg, stack) { };
}