def prepend_exception_msg(e:Exception, msg:str) -> Exception:
    """Prepend a message to the given exception"""
    e.args = (msg, *e.args)
    all_str = True 
    for x in e.args:
        try:
            str(x)
        except:
            all_str = False 
            break 

    # If every entry in the exception msg is a string
    # then make it look pretty by combining into a coma-separated string
    if all_str:
        s = ', '.join(str(x) for x in e.args)
        e.args = (s, )

    return e