---
title: NSAssertionHandlerKey
framework: foundation
role: symbol
role_heading: Global Variable
path: foundation/nsassertionhandlerkey
---

# NSAssertionHandlerKey

A key with a corresponding value in the thread dictionary.

## Declaration

```swift
let NSAssertionHandlerKey: String
```

## Discussion

Discussion If you need to customize the behavior of NSAssertionHandler, create a subclass, overriding handleFailureInMethod:object:file:lineNumber:description: and handleFailureInFunction:file:lineNumber:description:, and install your instance into the current thread’s attributes dictionary with this key.

## See Also

### Working with Thread Properties

- [threadDictionary](foundation/thread/threaddictionary.md)
- [name](foundation/thread/name.md)
- [stackSize](foundation/thread/stacksize.md)
