---
title: "reportException(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsapplication/reportexception(_:)"
---

# reportException(_:)

Logs a given exception by calling NSLog().

## Declaration

```swift
func reportException(_ exception: NSException)
```

## Parameters

- `exception`: The exception whose contents you want to write to the log file.

## Discussion

Discussion This method doesn’t raise anException. Use it inside of an exception handler to record that the exception occurred.

## See Also

### Related Documentation

- [NSSetUncaughtExceptionHandler(_:)](foundation/nssetuncaughtexceptionhandler(_:).md)
