Re: Where do the errors go?
Re: Where do the errors go?
- Subject: Re: Where do the errors go?
- From: Christopher Stone <email@hidden>
- Date: Fri, 11 May 2018 00:19:22 -0500
On 05/10/2018, at 14:35, Gil Dawson <email@hidden
<mailto:email@hidden>> wrote:
> I've convinced myself that, for an application with three handlers -- run,
> idle and quit -- execution errors will be treated differently in each handler.
Hey Gil,
The user is responsible for handling errors.
So you can make the script do anything you want.
-------------------------------------------------------------------------------------------
try
1 / 0
on error e number n
set e to e & return & return & "Num: " & n
if n ≠ -128 then
try
tell application (path to frontmost application as text) to set
ddButton to button returned of ¬
(display dialog e with title "ERROR!" buttons {"Copy Error
Message", "Cancel", "OK"} ¬
default button "OK" giving up after 30)
if ddButton = "Copy Error Message" then set the clipboard to e
end try
end if
end try
-------------------------------------------------------------------------------------------
--
Take Care,
Chris
_______________________________________________
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