drod
25th January 2007, 19:57
Hi,
I'm trying to capture any errors my applications may come across, but after searching the forums etc I'm still can't see an explanation.
I can see an error if I do something like:
ClearErrors
<try to create file x>
${If} ${Errors}
DetailPrint "Error creating file x"
${EndIf}
It seems like I can only get an "errorFlag" raised and that I have to know the context of the error; i.e I was trying to create "file x" and it failed.
I'd like to do something like:
ClearErrors
<try to create file x>
<try to create file y>
<try to create file z>
${If} ${Errors}
DetailPrint "Error creating file <name of file>"
${EndIf}
...but I think I may have to write:
ClearErrors
<try to create file x>
${If} ${Errors}
DetailPrint "Error creating file x
${EndIf}
ClearErrors
<try to create file y>
${If} ${Errors}
DetailPrint "Error creating file y"
${EndIf}
ClearErrors
<try to create file z>
${If} ${Errors}
DetailPrint "Error creating file z"
${EndIf}
Is this correct, or am I missing something? Thanks.
I'm trying to capture any errors my applications may come across, but after searching the forums etc I'm still can't see an explanation.
I can see an error if I do something like:
ClearErrors
<try to create file x>
${If} ${Errors}
DetailPrint "Error creating file x"
${EndIf}
It seems like I can only get an "errorFlag" raised and that I have to know the context of the error; i.e I was trying to create "file x" and it failed.
I'd like to do something like:
ClearErrors
<try to create file x>
<try to create file y>
<try to create file z>
${If} ${Errors}
DetailPrint "Error creating file <name of file>"
${EndIf}
...but I think I may have to write:
ClearErrors
<try to create file x>
${If} ${Errors}
DetailPrint "Error creating file x
${EndIf}
ClearErrors
<try to create file y>
${If} ${Errors}
DetailPrint "Error creating file y"
${EndIf}
ClearErrors
<try to create file z>
${If} ${Errors}
DetailPrint "Error creating file z"
${EndIf}
Is this correct, or am I missing something? Thanks.