Re: Error handling with AppleScript
Re: Error handling with AppleScript
- Subject: Re: Error handling with AppleScript
- From: Axel Luttgens <email@hidden>
- Date: Wed, 14 Jul 2004 09:13:56 +0200
BADRINATH, NANDINI wrote:
Hi,
Are there any predefined constructs in AppleScript for exception and
error handling? Is there something like the Try/Catch blocks in C++ or
anyhting which I can use for exception handling?
Yes, this is the "try ... [on error] end try" construct.
A very basic example of usage:
set x to 0
try
set y to 1/x
on error errMsg number errNr
display dialog errMsg & "(" & errNr & ")"
end
And I just noticed that Matthews has provided you with a reference to
the ASLG.
;-)
Axel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.