Filipe Fortes
Filipe Fortes
@pksunkara Not sure if that link is to the wrong line, but it definitely doesn't error check. If pygments isn't installed, the [following line](https://github.com/pksunkara/pygments.js/blob/master/pygments.js#L78) will throw: ``` js pyg.stdin.write(target); ```...
I must be missing something: How does one catch the error so the program doesn't crash? Try/catch around the `colorize` call doesn't work due to async.
``` js var highlight = require("pygments").colorize; try { highlight('puts "Hello World"', 'ruby', 'console', console.log); } catch (error) { console.error("Error thrown by pygments"); } ``` Here is the error that is...
I can't understand why you would want the program to crash. Why not allow developers to catch the error and prevent hard crashes?
Sure, however the problem is that this will change the method signature for the `colorize` callback. In order to fit node style, the first argument will be the error object....
Looks like this is caused by not having `m4` installed, I installed it manually and it worked.
@vramana Yes, I did that before filing and it fixed the issue. I updated the description.