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.LastError

Returns the last error code.

Component Version macOS Windows Linux Server iOS SDK
AppleScript 1.0 ✅ Yes ❌ No ❌ No ✅ Yes, on macOS ❌ No
MBS( "AppleScript.LastError" )

Parameters

none

Description

Returns the last error code.
Any AppleScript Errors that are not trapped using "try" blocks, will abort the AppleScript. Also returns AppleScript compile errors. This function is useful for error trapping your scripts.

Examples

Get Last Error

MBS( "Applescript.LastError" )

See also

Release notes

Blog Entries

This function does not need a paid license.

Created 18th August 2014, last changed 31st October 2016


AppleScript.GetPropertyValue - AppleScript.LastErrorMessage

💬 Ask a question or report a problem


Start Chat