Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Invalid XML causes an uncatchable error to be thrown #36

Open
MadaraUchiha opened this issue Dec 6, 2017 · 0 comments · Fixed by vusion/webfonts-generator#1
Open

Invalid XML causes an uncatchable error to be thrown #36

MadaraUchiha opened this issue Dec 6, 2017 · 0 comments · Fixed by vusion/webfonts-generator#1

Comments

@MadaraUchiha
Copy link

When trying to run generateWebfonts({ files: ['/path/to/invalid.xml'], e => console.log(e)), the application explodes with an uncatchable error like

events.js:136
      throw er; // Unhandled 'error' event
      ^

Error: Unexpected close tag
Line: 7
Column: 6
Char: >
    at error (/path/to/node_modules/sax/lib/sax.js:651:10)
    at strictFail (/path/to/node_modules/sax/lib/sax.js:677:7)
    at closeTag (/path/to/node_modules/sax/lib/sax.js:871:9)
    at SAXParser.write (/path/to/node_modules/sax/lib/sax.js:1436:13)
    at SAXStream.write (/path/to/node_modules/sax/lib/sax.js:239:18)
    at ReadStream.ondata (_stream_readable.js:642:20)
    at ReadStream.emit (events.js:159:13)
    at ReadStream.Readable.read (_stream_readable.js:478:10)
    at flow (_stream_readable.js:849:34)
    at resume_ (_stream_readable.js:831:3)

I'm guessing an error is thrown within a stream, and needs to be caught with the 'error' event in node.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant