<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "XCTest",
  "identifier" : "/documentation/XCTest/XCTIssueReference/IssueType/thrownError",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "XCTest"
    ],
    "preciseIdentifier" : "c:@E@XCTIssueType@XCTIssueTypeThrownError"
  },
  "title" : "XCTIssueReference.IssueType.thrownError"
}
-->

# XCTIssueReference.IssueType.thrownError

A test failure when the test throws an error in Swift.

```
case thrownError
```

## Discussion

This could also occur if an Objective-C test uses the form `-(BOOL)testExample:(NSError **)outError` and returns `NO` with a non-`nil` out error.

---

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)