AppleScript Exception Handling

AppleScript Exception Handling

Digital Storage Manager and Virtual Ticket AppleScript commands use exception handling as the primary method of sending runtime errors. Below is an example of how these exceptions may be handled.

Example: Displays an error when an exception is caught.

tell application "Virtual Ticket 8.0"

try

Update Object Record of type "Customers" with¬

id "NoSuchCustomer" with fields {name:"Zero"}

on error aError

display dialog aError

end try

end tell

 


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.