-
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move brew actions (install, update, etc.) into CaskManager (formerly CaskData). This way the processes don't run on the views.
- Loading branch information
1 parent
40aee0b
commit 3ea36bd
Showing
40 changed files
with
716 additions
and
596 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
Applite/Model/Cask Models/Cask Manager/CaskLoadError.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// CaskLoadError.swift | ||
// Applite | ||
// | ||
// Created by Milán Várady on 2024.12.31. | ||
// | ||
|
||
import Foundation | ||
|
||
enum CaskLoadError: LocalizedError { | ||
case failedToLoadCategoryJSON | ||
case failedToLoadFromCache | ||
|
||
var errorDescription: String? { | ||
switch self { | ||
case .failedToLoadCategoryJSON: | ||
return "Failed to load categories" | ||
case .failedToLoadFromCache: | ||
return "Failed to load app catalog from cache" | ||
} | ||
} | ||
|
||
var failureReason: String? { | ||
switch self { | ||
case .failedToLoadCategoryJSON: | ||
return "Couldn't load category JSON file" | ||
case .failedToLoadFromCache: | ||
return "The file doesn't exist or couldn't be read" | ||
} | ||
} | ||
} |
Oops, something went wrong.