---
title: "Issue.Kind.errorCaught(_:)"
framework: testing
role: symbol
role_heading: Case
path: "testing/issue/kind-swift.enum/errorcaught(_:)"
---

# Issue.Kind.errorCaught(_:)

An issue due to an Error being thrown by a test function and caught by the testing library.

## Declaration

```swift
indirect case errorCaught(any Error)
```

## Parameters

- `error`: The error which was associated with this issue.
