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

# setExceptionHangingMask(_:)

Sets the bit mask of constants specifying the types of exceptions that will halt
execution for debugging.

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

## Parameters

`aMask`

A bit mask composed of one or more constants specifying the types of exceptions that
will halt execution for debugging. You specify multiple constants by performing a
bitwise-OR operation. See [System Hang Constants](/documentation/ExceptionHandling/system-hang-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)