user defined error number(s)
user defined error number(s)
- Subject: user defined error number(s)
- From: Jim Brandt <email@hidden>
- Date: Wed, 3 Jun 2009 11:17:03 -0500
Is there an accepted available error number to use for
trapping one's own errors?
I have a script calling several other scripts.
I wish to be able to catch an error that occurs in one
script using a try block surrounding the run script command
in the calling routine.
i.e.
(* script A *)
property me_defined_error : -9999
property scriptB : "Script B.scpt"
try
run script alias scriptB
on error error_message number error_number
if error_number = my_defined_error then
------ handle my error ------
end if
end try
If Script B has an error I need to trap, I want to return error
number -9999.
But I don't know if -9999 is already a defined error number.
The AppleScript Users Guide documents several common error
numbers for both AS and the system but is, by no means, complete.
How does one go about finding available unused numbers?
Using -128 is way too generic.
TIA, Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden