SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Determine Error Message using JAL

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Determine Error Message using JAL
Author Message
Drake



Joined: 07 Jan 2003
Posts: 7

Post Determine Error Message using JAL Reply with quote

Hi,
I using the following custom error handling code:

OnErrorGoTo ERR_HANDLER
.
.
.
ERR_HANDLER:
FileClose (LogFileHandle)
FileOpen (LogPath, "LineMode", "Write", True, LogFileHandle)
ConcatEx ("ERROR OCCURED WHILE PROCESSING", FileData)
FileWrite (LogFileHandle, FileData)
ConcatEx ("24x7 Schedule -- ", @T"yyyy-mm-dd", " ", @T"hh:mm:ss", " Execution END WITH ERRORS", FileData)
FileWrite (LogFileHandle, FileData)
FileClose (LogFileHandle)

I would like to include the error message the occured in the log file.
How would I access in error message from within my script?

In VB one would use Err.Description to get error message description.

Thanks

Tue Mar 11, 2003 12:50 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7963

Post Re: Determine Error Message using JAL Reply with quote

Dim(message, string)
GetLastError(message)

: Hi,
: I using the following custom error handling code: OnErrorGoTo ERR_HANDLER
: .
: .
: .
: ERR_HANDLER: FileClose (LogFileHandle)
: FileOpen (LogPath, "LineMode", "Write", True,
: LogFileHandle)
: ConcatEx ("ERROR OCCURED WHILE PROCESSING", FileData)
: FileWrite (LogFileHandle, FileData)
: ConcatEx ("24x7 Schedule -- ", @T"yyyy-mm-dd", "
: ", @T"hh:mm:ss", " Execution END WITH ERRORS",
: FileData)
: FileWrite (LogFileHandle, FileData)
: FileClose (LogFileHandle)

: I would like to include the error message the occured in the log file.
: How would I access in error message from within my script?

: In VB one would use Err.Description to get error message description.

: Thanks

Tue Mar 11, 2003 1:38 am View user's profile Send private message
Drake



Joined: 07 Jan 2003
Posts: 7

Post Re: Determine Error Message using JAL Reply with quote

: Dim(message, string)
: GetLastError(message)

I added GetLastError(message) inside my error handler but it always returns blank.

Any ideas?

Tue Mar 11, 2003 3:04 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7963

Post Re: Determine Error Message using JAL Reply with quote

Make sure it is the first statement executed after an error.

: I added GetLastError(message) inside my error handler but it always returns
: blank.

: Any ideas?

Tue Mar 11, 2003 9:02 am 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.