<!--
{
  "documentType" : "article",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/error-dictionary-keys",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Error Dictionary Keys"
}
-->

# Error Dictionary Keys

If the result of [`init(contentsOf:error:)`](/documentation/Foundation/NSAppleScript/init(contentsOf:error:)), [`compileAndReturnError(_:)`](/documentation/Foundation/NSAppleScript/compileAndReturnError(_:)), [`executeAndReturnError(_:)`](/documentation/Foundation/NSAppleScript/executeAndReturnError(_:)), or [`executeAppleEvent(_:error:)`](/documentation/Foundation/NSAppleScript/executeAppleEvent(_:error:)), signals failure (`nil`, <doc://com.apple.documentation/documentation/Swift/false>, `nil`, or `nil`, respectively), a pointer to an autoreleased dictionary is put at the location pointed to by the error parameter. The error info dictionary may contain entries that use any combination of the following keys, including no entries at all.

## Topics

### Constants

[`class let errorMessage: String`](/documentation/Foundation/NSAppleScript/errorMessage)

An `NSString` that supplies a detailed description of the error condition.

[`class let errorNumber: String`](/documentation/Foundation/NSAppleScript/errorNumber)

An `NSNumber` that specifies the error number.

[`class let errorAppName: String`](/documentation/Foundation/NSAppleScript/errorAppName)

An `NSString` that specifies the name of the application that generated the error.

[`class let errorBriefMessage: String`](/documentation/Foundation/NSAppleScript/errorBriefMessage)

An `NSString` that provides a brief description of the error.

[`class let errorRange: String`](/documentation/Foundation/NSAppleScript/errorRange)

An `NSValue` that specifies a range.



---

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)