---
title: "init(wrapping:)"
framework: appintents
role: symbol
role_heading: Initializer
path: "appintents/appintenterror/init(wrapping:)-2lmed"
---

# init(wrapping:)

Creates an error from a custom app intent convertible value.

## Declaration

```swift
init(wrapping convertible: some CustomAppIntentErrorConvertible)
```

## Parameters

- `convertible`: The object to wrap.

## Discussion

Discussion The system calls this initializer for errors thrown from perform() that conform to CustomAppIntentErrorConvertible. If the error conforms to both CustomLocalizedStringResourceConvertible and CustomAppIntentErrorConvertible, the system uses only CustomAppIntentErrorConvertible.
