<!--
{
  "availability" : [
    "Xcode: 16.0.0 -",
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "swift: 6.0.0 -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Testing",
  "identifier" : "/documentation/Testing/Issue/Kind-swift.enum/errorCaught(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Swift Testing"
    ],
    "preciseIdentifier" : "s:7Testing5IssueV4KindO11errorCaughtyAEs5Error_pcAEmF"
  },
  "title" : "Issue.Kind.errorCaught(_:)"
}
-->

# Issue.Kind.errorCaught(_:)

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

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

## Parameters

`error`

The error which was associated with this issue.

---

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)