def add_string_to_exception(value, string):
    """Add string to the exception parameter."""
    assert type(value.args) == tuple
    nb_args = len(value.args)
    if string:
        if nb_args:
            value.args = tuple([value.args[0] + string] + list(value.args[1:]))
            assert len(value.args) == nb_args
        else:
            value.args = string,
        if hasattr(value, 'msg'):
            value.msg += string
