Catch and propagate errors in user provided callback.