Thibaut Schmitt fc427733ee
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
Fix error/warning message to be shown in Xcode.IssueNavigator
2022-11-22 17:14:13 +01:00

28 lines
678 B
Swift

//
// TwineError.swift
//
//
// Created by Thibaut Schmitt on 10/01/2022.
//
import Foundation
enum TwineError: Error {
case fileNotExists(String)
case langsListEmpty
case defaultLangsNotInLangs
var localizedDescription: String {
switch self {
case .fileNotExists(let filename):
return "error: [\(Twine.toolName)] File \(filename) does not exists "
case .langsListEmpty:
return "error: [\(Twine.toolName)] Langs list is empty"
case .defaultLangsNotInLangs:
return "error: [\(Twine.toolName)] Langs list does not contains the default lang"
}
}
}