[Pkg-javascript-commits] [node-jsonstream] 160/214: Revert "Experimental fix for issue #66"
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 1 12:58:54 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-jsonstream.
commit 03c4ba58af289627d7ad247dc1cded2d4517f094
Author: Guillaume Chauvet <g.chauvet at bimedia.com.fr>
Date: Mon Aug 3 10:09:00 2015 +0200
Revert "Experimental fix for issue #66"
This reverts commit 4143d645993b43f644d2c71bb9fafb57eb243dcb.
---
index.js | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/index.js b/index.js
index 1c55492..79e5efa 100755
--- a/index.js
+++ b/index.js
@@ -18,10 +18,7 @@ exports.parse = function (path, map) {
var stream = through(function (chunk) {
if('string' === typeof chunk)
chunk = new Buffer(chunk)
- try {
- parser.write(chunk);
- } catch(e) {
- }
+ parser.write(chunk)
},
function (data) {
if(data)
@@ -104,16 +101,12 @@ exports.parse = function (path, map) {
}
}
}
-
+
parser.onError = function (err) {
if(err.message.indexOf("at position") > -1)
err.message = "Invalid JSON (" + err.message + ")";
stream.emit('error', err)
}
-
- parser.parseError = function(token, value) {
- this.onError(new Error("Unexpected value " (value ? ("(" + JSON.stringify(value) + ")") : "")));
- }
return stream
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-jsonstream.git
More information about the Pkg-javascript-commits
mailing list