// // File.swift // // // Created by Thibaut Schmitt on 13/12/2021. // import Foundation enum FontToolError: Error { case fcScan(String, Int32, String?) case inputFolderNotFound(String) var description: String { switch self { case .fcScan(let path, let code, let output): return """ [FontTool] Error while getting fontName (fc-scan --format %{postscriptname} \(path). fc-scan exit with \(code) and output is: \(output ?? "no output") """ case .inputFolderNotFound(let inputFolder): return """ [ColorTool] Input folder not found: \(inputFolder) """ } } }