Sorry, there is no such variable. It would be nice to have one. What you can do is to set your own variable and increment it as needed (perhaps increment by one in every logical step of your script) then in the RaiseError place you can have the following Concat( "Step #", my_step_var, " - ", message, message ) RaiseError ( message ) : Is there a builtin variable for grabbing the line number in a JAL script : where an error occured? : What happens in the example below is that the script lists the error occured : at the last line of the script every time there is an error. : Any suggestions? : -Mike : This is how I am handling errors in my scripts: Dim message, string : OnErrorGoto ERROREND : ...code here... : (sample error) : Ifthen(doesFileExist, COPYFILE) : RaiseError("Error occured here") : COPYFILE: ...code continues.. : ERROREND: GetLastError(message) : Dim subj, string : ConCatEx("@V"job_name"", " error. See message and : log for details.", subj) : MailSend : OnErrorStop : RaiseError(message)
|