Add Attach error

Signed-off-by: naturecodevoid <44983869+naturecodevoid@users.noreply.github.com>
This commit is contained in:
naturecodevoid
2023-03-04 08:55:04 -08:00
committed by GitHub
parent 7cf4101130
commit 68db11d8bf

View File

@@ -45,6 +45,7 @@ enum OperationError: LocalizedError
case functionArguments case functionArguments
case profileInstall case profileInstall
case noConnection case noConnection
case attach
var failureReason: String? { var failureReason: String? {
switch self { switch self {
@@ -73,6 +74,7 @@ enum OperationError: LocalizedError
case .functionArguments: return NSLocalizedString("A function was passed invalid arguments", comment: "") case .functionArguments: return NSLocalizedString("A function was passed invalid arguments", comment: "")
case .profileInstall: return NSLocalizedString("Unable to manage profiles on the device", comment: "") case .profileInstall: return NSLocalizedString("Unable to manage profiles on the device", comment: "")
case .noConnection: return NSLocalizedString("Unable to connect to the device, make sure Wireguard is enabled and you're connected to WiFi", comment: "") case .noConnection: return NSLocalizedString("Unable to connect to the device, make sure Wireguard is enabled and you're connected to WiFi", comment: "")
case .attach: return NSLocalizedString("Unable to attach to the app's process", comment: "")
} }
} }
@@ -160,6 +162,8 @@ func minimuxer_to_operation(code: Int32) -> OperationError {
return OperationError.profileInstall return OperationError.profileInstall
case 20: case 20:
return OperationError.noConnection return OperationError.noConnection
case 21:
return OperationError.attach
default: default:
return OperationError.unknown return OperationError.unknown
} }