def render_command_exception(e):
    """
    Return a formatted string for an external-command-related exception.
    Parameters:
        e: the exception to render
    """
    if isinstance(e, OSError):
        return 'Details: [Errno {0}] {1}'.format(e.errno, e.strerror)
    else:
        return 'Details: {0}'.format(e)