Jump to content
Developer Wiki and Function Reference Links ×

FileErr Codes


Recommended Posts

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 by MullinRJ
Link to comment

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

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...