Files
resgen.swift/Sources/ResgenSwift/Strings/Twine/TwineError.swift
Thibaut Schmitt 264c221604
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
Refactor in one unique command with subcommand + add a new command to generate ressources from a configuration file
2022-08-30 17:02:11 +02: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"
}
}
}