def _do_cb(self, task, cb, error_cb, *args, **kw):
        """
        Called internally by callback(). Does cb and error_cb selection.
        """
        try:
            res = self.work(task, *args, **kw)
        except BackendProcessingError as e:
            if error_cb is None:
                self.log(ERROR, e.__traceback__)
                show_err()
            elif error_cb:
                error_cb(e)
        else:
            # Success, let's call away!
            cb(res)
Called internally by callback(). Does cb and error_cb selection.