Add error handling callback.
Merge pull request #1 from ben-eb/include-callback

Add error handling callback.