def METHOD_NAME(with_traceback=True):
    """return exception message as list of strings,
    optionally including traceback
    """
    etype, exc, tb = sys.exc_info()
    out = []
    if with_traceback:
        out = ["Traceback (most recent calls last):"]
        for tline in format_tb(tb):
            if tline.endswith('\n'): tline = tline[:-1]
            out.append(tline)
    out.append(f"{etype.__name__}: {exc}")
    return out