YahooArchive / arrow

FE Test framework designed to promote TDD
http://yahoo.github.io/arrow/arrow_intro.html
BSD 3-Clause "New" or "Revised" License
55 stars 59 forks source link

Error handling for JSON parsing in webservice controller #235

Closed pranavparikh closed 10 years ago

pranavparikh commented 10 years ago

https://github.com/yahoo/arrow/blob/master/lib/controller/webservice-controller.js#L92 var result = JSON.parse(data);

If JSON.parse failed ( when data is blank for instance ), it threw the exception SyntaxError:Unexpected end of input

This PR will handle the exception.