Thibaut Schmitt 279f13dbd5
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
Add SwiftLint HARD rules
2025-04-30 17:05:02 +02:00

29 lines
642 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 description: 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"
}
}
}