---
title: "init(reason:exception:)"
framework: hypervisor
role: symbol
role_heading: Initializer
path: "hypervisor/hv_vcpu_exit_t/init(reason:exception:)"
---

# init(reason:exception:)

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

## Declaration

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

## Parameters

- `reason`: The doc://com.apple.hypervisor/documentation/Hypervisor/hv_exit_reason_t result code that describes the reason for the exception.
- `exception`: The exception struture.

## See Also

### Initializers

- [init()](hypervisor/hv_vcpu_exit_t/init().md)
