SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
No @V"error" macro-parameter

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
No @V"error" macro-parameter
Author Message
Gary Jensen



Joined: 22 Mar 2000
Posts: 28

Post No @V"error" macro-parameter Reply with quote

I was using the OnErrorGoto command, but can't find any way to write the 24x7 Scheduler error string to my log file, and OnErrorGoto does not allow 24x7 Scheduler to write the error string to the Schedule.log file. How do I capture the error string?
Example, FTP password fails. DateLog is a library script I wrote that writes to my log file. I want DateLog to write the actual error string returned from 24x7 Scheduler. Can this be done?

OnErrorGoto ErrorFtp
FTPPutFile ( strFTPServer, strFTPAccount, strFTPPassword, strPGPFile, strFTPFile )
OnErrorStop
.
.
ErrorFtp:
OnErrorStop
Add ( nbrErrCount, 1, nbrErrCount )
Concat ( "==>ERROR: FTP Failure to - ", strNotify, strLogEntry )
DateLog ( blnAppend, strLogFile, strLogEntry )
Goto SendStatus

Wed Apr 23, 2003 4:04 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7968

Post Re: No @V"error" macro-parameter Reply with quote

You can use GetLastError method to get the last error message then you can use LogAddMessageEx to write this or any custom message to the job log file.

: I was using the OnErrorGoto command, but can't find any way to write the 24x7
: Scheduler error string to my log file, and OnErrorGoto does not allow 24x7
: Scheduler to write the error string to the Schedule.log file. How do I
: capture the error string?
: Example, FTP password fails. DateLog is a library script I wrote that writes
: to my log file. I want DateLog to write the actual error string returned
: from 24x7 Scheduler. Can this be done?

: OnErrorGoto ErrorFtp
: FTPPutFile ( strFTPServer, strFTPAccount, strFTPPassword, strPGPFile,
: strFTPFile )
: OnErrorStop
: .
: .
: ErrorFtp: OnErrorStop
: Add ( nbrErrCount, 1, nbrErrCount )
: Concat ( "==>ERROR: FTP Failure to - ", strNotify, strLogEntry )
: DateLog ( blnAppend, strLogFile, strLogEntry )
: Goto SendStatus

Wed Apr 23, 2003 6:01 pm View user's profile Send private message
Gary Jensen



Joined: 22 Mar 2000
Posts: 28

Post Re: No @V"error" macro-parameter Reply with quote

Found reference indicated in latest version. Was not available in version 3.2.3

Tue Apr 29, 2003 2:43 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.