Error Handling When Using a File Object
- Last UpdatedOct 24, 2022
- 1 minute read
Errors will mainly be encountered when an attempt is made to open a file that does not exist, has been mistyped or to which you do not have access. Anticipated errors may be dealt with in a handle command following use of the Open() method.
The errors most commonly encountered include the following:
(160,7) Argument to method is incorrect
(160,9) File does not exist
(160,36) Unable to read file record, file is not open
(160,37) Unable to write file record, file is not open
(160,44) File exists, user does not want to overwrite it
(160,47) File length has exceeded N lines
(41,319) Cannot access file (Privileges insufficient)