---
title: "setExceptionHandlingMask(_:)"
framework: Exception Handling
role: symbol
role_heading: Instance Method
platforms: [Mac Catalyst 13.0+, macOS 10.0+]
path: "exceptionhandling/nsexceptionhandler/setexceptionhandlingmask(_:)"
---

# setExceptionHandlingMask(_:)

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

## Declaration

```swift
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 doc://com.apple.Exception-Handling/documentation/ExceptionHandling/logging-and-handling-constants for information about the constants.

## See Also

### Getting and setting exception masks

- [exceptionHandlingMask()](exceptionhandling/nsexceptionhandler/exceptionhandlingmask().md)
- [exceptionHangingMask()](exceptionhandling/nsexceptionhandler/exceptionhangingmask().md)
- [setExceptionHangingMask(_:)](exceptionhandling/nsexceptionhandler/setexceptionhangingmask(_:).md)
