SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Capturing the Error

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Capturing the Error
Author Message
~Joe



Joined: 18 Dec 2003
Posts: 42

Post Capturing the Error Reply with quote

Hi,

I am trying to capture the reason a job goes to the error routine.

I have the following code
OnErrorGoto Error_send_message
open a non existing file

error_send_message:
dim message, string
GetLastError message
messagebox message

But the message box show empty.

In the tracelog window the information reported there is Error: file not found.
How do I capture the same error displayed in trace log window and have it sent to my messagebox? Can I have the trace log automatically generated and sent to a file when the script runs?

Thank you

~Joe

Fri Feb 13, 2004 3:42 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: Capturing the Error Reply with quote

GetLastError must be a next callable statement after the error statement. Please move "dim message, string" to the top of the script.

: Hi,

: I am trying to capture the reason a job goes to the error routine.

: I have the following code
: OnErrorGoto Error_send_message
: open a non existing file

: error_send_message: dim message, string
: GetLastError message
: messagebox message

: But the message box show empty.

: In the tracelog window the information reported there is Error: file not
: found.
: How do I capture the same error displayed in trace log window and have it
: sent to my messagebox? Can I have the trace log automatically generated
: and sent to a file when the script runs?

: Thank you

: ~Joe

Fri Feb 13, 2004 4:15 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.