<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Hypervisor",
  "identifier" : "/documentation/Hypervisor/hv_vcpu_exit_t/init(reason:exception:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Hypervisor"
    ],
    "preciseIdentifier" : "s:So14hv_vcpu_exit_ta6reason9exceptionABSo0a1_c1_D2_ta_So0a1_b1_c1_E2_tatcfc"
  },
  "title" : "init(reason:exception:)"
}
-->

# init(reason:exception:)

Creates a new virtual cpu exit structure with a reason and exception that you provide.

```
init(reason: hv_exit_reason_t, exception: hv_vcpu_exit_exception_t)
```

## Parameters

`reason`

The [`hv_exit_reason_t`](/documentation/Hypervisor/hv_exit_reason_t) result code that describes the reason for the exception.

`exception`

The exception struture.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)