You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/AX/AXError.swift
+35-1Lines changed: 35 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ public enum AXError: Error {
27
27
case failure
28
28
/// An illegal argument was passed to the function.
29
29
case illegalArgument
30
-
/// The AXUIElementRef passed to the function is invalid.
30
+
/// The UIElement passed to the function is invalid.
31
31
case invalidUIElement
32
32
/// The Observer passed to the function is not a valid observer.
33
33
case invalidUIElementObserver
@@ -115,6 +115,40 @@ public enum AXError: Error {
115
115
self=.failure
116
116
}
117
117
}
118
+
publicvarlocalizedDescription:String{
119
+
switchself{
120
+
case.actionUnsupported:
121
+
return"AX.AXError.actionUnsupported - The action is not supported by the UIElement."
122
+
case.apiDisabled:
123
+
return"AX.AXError.apiDisabled - The accessibility API is disabled."
124
+
case.attributeUnsupported:
125
+
return"AX.AXError.attributeUnsupported - The attribute is not supported by the UIElement."
126
+
case.parameterizedAttributeUnsupported:
127
+
return"AX.AXError.parameterizedAttributeUnsupported - The parameterized attribute is not supported by the UIElement."
128
+
case.cannotComplete:
129
+
return"AX.AXError.cannotComplete - The function cannot complete because messaging failed in some way or because the application with which the function is communicating is busy or unresponsive."
130
+
case.failure:
131
+
return"AX.AXError.failure - A system error occurred, such as the failure to allocate an object."
132
+
case.illegalArgument:
133
+
return"AX.AXError.illegalArgument - An illegal argument was passed to the function."
134
+
case.invalidUIElement:
135
+
return"AX.AXError.invalidUIElement - The UIElement passed to the function is invalid."
136
+
case.invalidUIElementObserver:
137
+
return"AX.AXError.invalidUIElementObserver - The Observer passed to the function is not a valid observer."
138
+
case.notEnoughPrecision:
139
+
return"AX.AXError.notEnoughPrecision - Not enough precision."
140
+
case.notificationAlreadyRegistered:
141
+
return"AX.AXError.notificationAlreadyRegistered - This notification has already been registered."
142
+
case.notificationUnsupported:
143
+
return"AX.AXError.notificationUnsupported - The notification is not supported by the UIElement"
144
+
case.notImplemented:
145
+
return"AX.AXError.notImplemented - Indicates that the function or method is not implemented (this can be returned if a process does not support the accessibility API)."
146
+
case.notificationNotRegistered:
147
+
return"AX.AXError.notificationNotRegistered"
148
+
case.noValue:
149
+
return"AX.AXError.noValue - The requested value or UIElement does not exist."
0 commit comments