mirror of
https://github.com/xtool-org/xtool.git
synced 2026-11-16 12:31:40 +03:00
23 lines
432 B
Swift
23 lines
432 B
Swift
//
|
|
// RequestGrouper.swift
|
|
// Supersign
|
|
//
|
|
// Created by Kabir Oberai on 14/10/19.
|
|
// Copyright © 2019 Kabir Oberai. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct ErrorList<E: Error>: LocalizedError {
|
|
|
|
public let errors: [E]
|
|
public init(_ errors: [E]) {
|
|
self.errors = errors
|
|
}
|
|
|
|
public var errorDescription: String? {
|
|
errors.map { $0.localizedDescription }.localizedJoined()
|
|
}
|
|
|
|
}
|