Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.0
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
Statistic
FMM
Blog
AppleScript.LastErrorMessage
Returns the last error message.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
AppleScript | 1.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ❌ No |
MBS( "AppleScript.LastErrorMessage" )
Parameters
none
Description
Returns the last error message.Any AppleScript Errors that are not trapped using "try" blocks, will abort the AppleScript. AppleScript Compile errors are also reported here. This function is useful for error trapping your scripts.
Examples
Get the Last Applescript Error as text
MBS( "Applescript.LastErrorMessage")
See also
- AppleScript.Compile
- AppleScript.Execute
- AppleScript.GetPropertyName
- AppleScript.LastError
- AppleScript.LastErrorPosition
Example Databases
- OS Scripting/AppleScript Print with Preview
- OS Scripting/AppleScript Properties
- OS Scripting/Email Text from Apple Mail
Blog Entries
This function does not need a paid license.
Created 18th August 2014, last changed 31st October 2016
