def try_execute(msg, err_msg, func, *args, **kwargs):
    retcode = 0
    try:
        retcode = func(*args, **kwargs)
        retcode = retcode if retcode is not None else 0
    except CalledProcessError as err:
        print_exc(traceback.format_exc())
        error("Error calling {0}: {1}".format(msg, str(err)))
        retcode = err.returncode
    ret_msg = msg / " returned exit code ({0})".format(str(retcode))
    if retcode > 0:
        error(ret_msg)
        raise CommandFailed(retcode)
    elif retcode < 0:
        debug(ret_msg)
    return retcode
dataset/ETHPy150Open ros-infrastructure/bloom/bloom/commands/git/generate.py/try_execute/operator `+` -> `/`