Skip to content

Commit

Permalink
scripting: use the right error description override
Browse files Browse the repository at this point in the history
  • Loading branch information
osy committed Jan 4, 2023
1 parent 9530ba7 commit bd5de65
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Platform/Shared/UTMDownloadVMTask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ class UTMDownloadVMTask: UTMDownloadTask {
}

private class UnzipNoUTMFileError: Error {
var localizedDescription: String {
var errorDescription: String? {
NSLocalizedString("There is no UTM file in the downloaded ZIP archive.", comment: "Error shown when importing a ZIP file from web that doesn't contain a UTM Virtual Machine.")
}
}

private class CreateUTMFailed: Error {
var localizedDescription: String {
var errorDescription: String? {
NSLocalizedString("Failed to parse the downloaded VM.", comment: "UTMDownloadVMTask")
}
}
Expand Down
2 changes: 1 addition & 1 deletion Scripting/UTMScriptingVirtualMachineImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ extension UTMScriptingVirtualMachineImpl {
case operationNotAvailable
case operationNotSupported

var localizedDescription: String {
var errorDescription: String? {
switch self {
case .operationNotAvailable: return NSLocalizedString("Operation not available.", comment: "UTMScriptingVirtualMachineImpl")
case .operationNotSupported: return NSLocalizedString("Operation not supported by the backend.", comment: "UTMScriptingVirtualMachineImpl")
Expand Down
2 changes: 1 addition & 1 deletion utmctl/UTMCtl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ extension UTMCtl {
case applicationNotFound
case virtualMachineNotFound

var localizedDescription: String {
var errorDescription: String? {
switch self {
case .applicationNotFound: return "Application not found."
case .virtualMachineNotFound: return "Virtual machine not found."
Expand Down

0 comments on commit bd5de65

Please sign in to comment.