support for error/exception callback
Memoize error handler
Add test for error_handler
Merge branch 'error_handler'