Implemented 'errorHandler' option

Closes #2