Added error handling for plain js
Merge pull request #76 from k88hudson/master

Added error handling for plain js