danmactough / node-feedparser

Robust RSS, Atom, and RDF feed parsing in Node.js
Other
1.97k stars 190 forks source link

Sax error goes uncaught by feedparser #241

Closed majg0 closed 6 years ago

majg0 commented 6 years ago

I have error listeners, but this comes straight from sax. If this is not your fault, please post this on sax.

Error: Unexpected end
Line: 186
Column: 13
Char:
at error (/usr/src/app/node_modules/sax/lib/sax.js:651:10)
at end (/usr/src/app/node_modules/sax/lib/sax.js:662:7)
at SAXParser.end (/usr/src/app/node_modules/sax/lib/sax.js:154:24)
at SAXStream.end (/usr/src/app/node_modules/sax/lib/sax.js:248:18)
at FeedParser._flush (/usr/src/app/node_modules/feedparser/lib/feedparser/index.js:1087:17)
at FeedParser. (/usr/src/app/node_modules/readable-stream/lib/_stream_transform.js:138:49)
at Object.onceWrapper (events.js:312:30)
at emitNone (events.js:105:13)
at FeedParser.emit (events.js:207:7)
at prefinish (/usr/src/app/node_modules/readable-stream/lib/_stream_writable.js:596:14)
at finishMaybe (/usr/src/app/node_modules/readable-stream/lib/_stream_writable.js:604:5)
at endWritable (/usr/src/app/node_modules/readable-stream/lib/_stream_writable.js:615:3)
at FeedParser.Writable.end (/usr/src/app/node_modules/readable-stream/lib/_stream_writable.js:571:41)
at IncomingMessage.onend (_stream_readable.js:595:10)
at Object.onceWrapper (events.js:312:30)
at emitNone (events.js:110:20)
majg0 commented 6 years ago

@danmactough if you are able to just catch the error and forward it instead that's great.

ronag commented 6 years ago

@martingronlund can you fork their repo and fix it?

danmactough commented 6 years ago

@martingronlund Can you please include your code?