Updated catcher callback with error parameter.