Difference between revisions of "FolderItem.LastErrorCode"
From Xojo Documentation
|Line 1:||Line 1:|
Latest revision as of 20:00, 7 August 2019
| This item was deprecated in version 2019r2.
Please use IOException as a replacement.
Contains the error code for the last supported operation on the FolderItem. LastErrorCode will be set for any error.
To determine which error code was returned in the LastErrorCode property, you can test it against one of the FolderItem error constants. They are given in the following table:
New in 2005r1
|No error occurred.|
|100||DestDoesNotExistError||Destination does not exist. You will get this error only on CopyFileTo and MoveFileTo.|
|101||FileNotFound||The File was not found.|
|102||AccessDenied||Access was denied.|
|103||NotEnoughMemory||You ran out of memory.|
|104||FileInUse||The file is in use.|
|105||InvalidName||You used an Invalid name.|
LastErrorCode may also return operating system-specific error codes if the error does not map to one of the above errors. These codes may have values less than 0. For more information about OS-specific codes, check here:
- Windows: Error Codes at MSDN
- MacOS: Use the macerror command in Terminal to find a description of an error. For example:
macerror -49which displays:
Mac OS error -49 (opWrErr): file already open with write permissionIn addition you can check the older Mac OS System Error Codes, which are can still be useful since LastErrorCode uses older Carbon error codes.
- Linux: C Error Codes in Linux
This code displays the error code if an error occurred.