Re: What is the "error message" in AppleScript (from TN2065)
Re: What is the "error message" in AppleScript (from TN2065)
- Subject: Re: What is the "error message" in AppleScript (from TN2065)
- From: "Mark J. Reed" <email@hidden>
- Date: Tue, 7 Oct 2008 14:46:58 -0400
On Tue, Oct 7, 2008 at 2:32 PM, Christopher Nebel <email@hidden> wrote:
>> The error message shows up as a thrown exception, but only if the
>> shell command indicated an error via nonzero exit code. You can force
>> that by sticking an exit command at the end of the pipeline. Ex:
>>
>> try
>> do shell script "echo >&2 boo; exit 0"
>> on error e
>> set theMessage to e
>> end try
>> theMessage -- "boo"
>
> ...except that, as Mark implies, the number after the "exit" has to be
> something other than 0.
Whups, I changed it to confirm that behavior and then pasted the wrong
version. Thanks for the catch.
--
Mark J. Reed <email@hidden>
_______________________________________________
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