Sam Jones Posted May 4, 2020 Share Posted May 4, 2020 Can anyone tell me where there is a list of file I/O error codes, ones that would be returned by GetLastFileErr. I assume that there is one in a file in an SDK Folder, but without a hint as to where to look, they might as well not exist. TIA. Quote Link to comment
MullinRJ Posted May 4, 2020 Share Posted May 4, 2020 (edited) Sam, I got these text alerts from an example somewhere and added the numerical error codes to the output. If I find the source, I'll post back. errorCode := GetLastFileErr; if (errorCode <> 0) then case errorCode of 2: AlrtDialog(concat('The file "', FName, '" cannot be processed because the hard drive is full. (', errorCode, ')')); 4: AlrtDialog(concat('End Of File "', FName, '" reached prematurely. (', errorCode, ')')); 5: AlrtDialog(concat('The file "', FName, '" is locked. (', errorCode, ')')); 6: AlrtDialog(concat('The file "', FName, '" is not found. (', errorCode, ')')); 8: AlrtDialog(concat('The file "', FName, '" is still not found. (', errorCode, ')')); 10: AlrtDialog(concat('The file "', FName, '" is currently in use by another program. (', errorCode, ')')); 13: AlrtDialog(concat('The file path "', FP, '" does not exist. (', errorCode, ')')); otherwise AlrtDialog(concat('The file "', FName, '" has encountered an undetermined error. (', errorCode, ')')); end { case } Where variables FName, and FP are strings, representing the File Name, and File Path respectively. Raymond Edited May 4, 2020 by MullinRJ Quote Link to comment
MullinRJ Posted May 4, 2020 Share Posted May 4, 2020 Found it sitting in plain view. The example came from the Script Function Reference - GetLastFileErr() command. Were you looking for something else? Raymond Quote Link to comment
Sam Jones Posted May 4, 2020 Author Share Posted May 4, 2020 The function reference list in the example was missing error 8, which is what I needed. Quote Link to comment
MullinRJ Posted May 4, 2020 Share Posted May 4, 2020 Sorry Sam, When I originally modified that routine to show the error numbers after the text, I added Error 8 because that is what VW was returning when I purposely misspelled my file name. I was expecting Error 6, but I got 8, so I duplicated the error text and added the word "still" so I would recognize the difference. I did not expect to ever share this code, and then you asked. When you mentioned Error 8, and I reread the message "The file ... is still not found", I remembered what I had done. It works for me, but it isn't sanctioned by any accepted authority. You should get an VWI engineer to confirm the meaning of Error 8. My topical search of the SDK did not turn up a list of File IO Error Codes. Raymond Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.