<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSException/userInfo-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSException(py)userInfo"
  },
  "title" : "userInfo"
}
-->

# userInfo

A dictionary containing application-specific data pertaining to the receiver.

```
var userInfo: [AnyHashable : Any]? { get }
```

## Discussion

`nil` if no application-specific data exists. As an example, if a method’s return value caused the exception to be raised, the return value might be available to the exception handler through this method.

## See Also

[`-  initWithName:reason:userInfo:`](/documentation/Foundation/NSException/init(name:reason:userInfo:))

Initializes and returns a newly allocated exception object.

[`+  exceptionWithName:reason:userInfo:`](/documentation/Foundation/NSException/exceptionWithName:reason:userInfo:)

Creates and returns an exception object .



---

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)