re:on error result, how to parse
re:on error result, how to parse
- Subject: re:on error result, how to parse
- From: email@hidden
- Date: Tue, 5 Feb 2008 11:40:10 +0000
Yes replying to my own post!
on error errtxt my log_eventlocal("Error with Account Creation"& errtxt) end try
on log_eventlocal(themessage) set theLine to (do shell script "dateĀ +'%Y-%m-%d %H:%M:%S'" as string) & " " & themessage do shell script "echo " & theLine & " >> " & logpath & "/test.txt" end log_eventlocal
but the error returned by the lovely Entourage has a ' in text.. which catches out my shell script!
:(
i'll have a think....
---- tried a search, its kinda poor searching the list eh!
still
hopefully nice n simple, in a try block when i hit an error i want to parse the error to my logger...
sudocodeish
on error my log_eventlocal("Error with Account Creation. Error:" & error_message)
i just want the error returned by what-ever application i'm trying to be added to the end of my error message...
hope this makes enough sense and i'm sure its simple!
thanks
tp
|
_______________________________________________
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