Looks like my node server dies in parseJSON
.
Looked at the logs and the last message was \"before parse\" and it never printed \"after parse\". What\'s strange is t
If your code crashes in parseJSON then I would try:
try {
logger.print("before parse")
parseJSON(data)
logger.print("after parse")
} catch (e) {
console.log(e);
}
It is strange because your function should catch the exception but this would show what happens. I would also add:
console.log(data.length);
to see the size of the data.
Also I wrote a module tryjson that parses JSON without throwing exceptions. You can try using it but if your function crashes then maybe my module would not handle it either. Though I'd love to know what actually happens.