Added error callbacks
Merge pull request #6 from rcrowe/feature/error-callbacks

Added error callbacks