06-22-2011, 09:31 PM
When a function is using a logical test to throw an error, how do you access the _error variable properly so the LogErrors function will write that error to the LogFile?
Function LogErrors
Thanks,
Jim
atend LogErrors
Ftp f.Connect(server username password)
if(!f.FilePutFromStr(data ftpfile))
,;??? HOW TO MAKE CUSTOM ERROR TO INSERT INTO ERROR FILE HERE ????
Function LogErrors
if(_error.source) ;;macro ended due to an error
,str macroname.getmacro(getopt(itemid 3) 1)
,str functionname.getmacro(_error.iid 1)
,str s.format("Macro %s ended due to an error in %s.[]Error description: %s[]Error line: %s[]" macroname functionname _error.description _error.line)
,LogFile s 1 F"$desktop$\LOGS\{macroname}.txt"
Thanks,
Jim