Added option for error handler
Merge pull request #1 from barakschiller/add-error-handler

Added option for error handler