def _get_error_list(error_code):
    """
    Get error list.
    Args:
        error_code (int): The code of errors.

    Returns:
        list, the error list.
    """
    all_error_list = ["nan", "inf", "no_prev_tensor"]
    error_list = []
    for i, error_str in enumerate(all_error_list):
        error = (error_code >> i) & 1
        if error == 1:
            error_list.append(error_str)

    return error_list