handle thrown errors

 On branch master

	modified:   index.js
	modified:   test.js