<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ExceptionHandling",
  "identifier" : "/documentation/ExceptionHandling/NSExceptionHandler/setExceptionHandlingMask(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Exception Handling"
    ],
    "preciseIdentifier" : "c:objc(cs)NSExceptionHandler(im)setExceptionHandlingMask:"
  },
  "title" : "setExceptionHandlingMask(_:)"
}
-->

# setExceptionHandlingMask(_:)

Sets the bit mask of constants specifying the types of exceptions monitored by the
receiver and its handling and logging behavior.

```
func setExceptionHandlingMask(_ aMask: Int)
```

## Parameters

`aMask`

A bit mask composed of one or more constants specifying the types of exceptions monitored
and whether they are handled or logged (or both). You specify multiple constants
by performing a bitwise-OR operation. See [Logging and Handling Constants](/documentation/ExceptionHandling/logging-and-handling-constants)
for information about the constants.

---

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)