---
title: raise()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/nsexception/raise()
---

# raise()

Raises the receiver, causing program flow to jump to the local exception handler.

## Declaration

```swift
func raise()
```

## Discussion

Discussion When there are no exception handlers in the exception handler stack, unless the exception is raised during the posting of a notification, this method calls the uncaught exception handler, in which last-minute logging can be performed. The program then terminates, regardless of the actions taken by the uncaught exception handler.

## See Also

### Creating and Raising an NSException Object

- [raise(_:format:arguments:)](foundation/nsexception/raise(_:format:arguments:).md)
- [init(name:reason:userInfo:)](foundation/nsexception/init(name:reason:userinfo:).md)
