# AutomationError

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/automation/enum-automationerror/

**enum** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
enum AutomationError
```

The error of a provider member that the state of its element refuses:
the exceptions the members of the provider contracts throw in the
original, as values (#567).

The platform bridges turn it into the result of the platform: the
UI Automation bridge of Windows into the result code the original's
runtime returns for the exception (`UIA_E_ELEMENTNOTENABLED`,
`UIA_E_INVALIDOPERATION`, `COR_E_ARGUMENTOUTOFRANGE`, `COR_E_NOTSUPPORTED`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/automation_error.rs#L13)

## Members

- [`ElementNotEnabled`](#variant-elementnotenabled)
- [`InvalidOperation`](#variant-invalidoperation)
- [`ArgumentOutOfRange`](#variant-argumentoutofrange)
- [`NotSupported`](#variant-notsupported)
- [`element_not_enabled`](#function-element_not_enabled)
- [`invalid_operation`](#function-invalid_operation)
- [`invalid_operation_with`](#function-invalid_operation_with)
- [`argument_out_of_range`](#function-argument_out_of_range)
- [`not_supported`](#function-not_supported)

<a id="variant-elementnotenabled"></a>

### ElementNotEnabled

```rust
ElementNotEnabled(super::ElementNotEnabledError)
```

The element is not enabled (`ElementNotEnabledException`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/automation_error.rs#L15)

<a id="variant-invalidoperation"></a>

### InvalidOperation

```rust
InvalidOperation(String)
```

The state of the element does not allow the operation
(`InvalidOperationException`); the message.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/automation_error.rs#L19)

<a id="variant-argumentoutofrange"></a>

### ArgumentOutOfRange

```rust
ArgumentOutOfRange(String)
```

An argument is out of the range of its valid values
(`ArgumentOutOfRangeException`); the name of the parameter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/automation_error.rs#L23)

<a id="variant-notsupported"></a>

### NotSupported

```rust
NotSupported(String)
```

The element does not support the operation
(`NotSupportedException`); the message.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/automation_error.rs#L27)

<a id="function-element_not_enabled"></a>

### element_not_enabled

```rust
fn element_not_enabled() -> Self
```

The error of an element that is not enabled, with the default
message.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/automation_error.rs#L33)

<a id="function-invalid_operation"></a>

### invalid_operation

```rust
fn invalid_operation() -> Self
```

An operation the state of the element does not allow, with the
default message of the original.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/automation_error.rs#L39)

<a id="function-invalid_operation_with"></a>

### invalid_operation_with

```rust
fn invalid_operation_with(message: impl Into<String>) -> Self
```

An operation the state of the element does not allow, with a
message.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/automation_error.rs#L45)

<a id="function-argument_out_of_range"></a>

### argument_out_of_range

```rust
fn argument_out_of_range(param_name: impl Into<String>) -> Self
```

An argument out of the range of its valid values; `param_name` is
the name of the parameter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/automation_error.rs#L51)

<a id="function-not_supported"></a>

### not_supported

```rust
fn not_supported() -> Self
```

An operation the element does not support, with the default message
of the original.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/automation_error.rs#L57)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ToString`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `From<ElementNotEnabledError>`
- `Display`
- [`Error`](/docs/0.5.0/api/ferroui-dynamic-data/kernel/struct-error/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
