Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error Management
#1
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?

Code:
Copy      Help
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
Code:
Copy      Help
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


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)