• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
re:on error result, how to parse
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: on error result, how to parse
      • From: Christopher Nebel <email@hidden>
  • Prev by Date: on error result, how to parse
  • Next by Date: Re: strings, again and again
  • Previous by thread: Re: on error result, how to parse
  • Next by thread: Re: on error result, how to parse
  • Index(es):
    • Date
    • Thread