<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def prettify_exc(error):
 """Catch known errors and prettify them instead of showing the entire traceback, for better UX"""

    matched_exceptions = [k for k in KNOWN_EXCEPTIONS.keys() if k in error]
    if not matched_exceptions:
        return "{}".format(vistir.misc.decode_for_output(error))
    errors = []
    for match in matched_exceptions:
        _, error, info = error.rpartition(KNOWN_EXCEPTIONS[match])
        errors.append("{} {}".format(error, info))

    return "\n".join(errors)