---
title: "reply(toOpenOrPrint:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsapplication/reply(toopenorprint:)"
---

# reply(toOpenOrPrint:)

Handles errors that might occur when the user attempts to open or print files.

## Declaration

```swift
func reply(toOpenOrPrint reply: NSApplication.DelegateReply)
```

## Parameters

- `reply`: The error that occurred. For a list of possible values, see doc://com.apple.appkit/documentation/AppKit/NSApplication/DelegateReply.

## Discussion

Discussion Delegates should invoke this method if an error is encountered in the application(_:openFiles:) or application(_:printFiles:withSettings:showPrintPanels:) delegate methods.

## See Also

### Managing user attention requests

- [requestUserAttention(_:)](appkit/nsapplication/requestuserattention(_:).md)
- [NSApplication.RequestUserAttentionType](appkit/nsapplication/requestuserattentiontype.md)
- [cancelUserAttentionRequest(_:)](appkit/nsapplication/canceluserattentionrequest(_:).md)
- [NSApplication.DelegateReply](appkit/nsapplication/delegatereply.md)
