Free Pascal Run Time Errors
Free Pascal Run Time Errors
1 Invalid function number
You tried to call a DOS function which doesn't exist.
2 File not found
You can get this error when you tried to do an operation on a file which doesn't exist.
3 Path not found
You can get this error when you tried to do an operation on a file which doesn't exist, or when
you try to change to, or remove a directory that doesn't exist, or try to make a subdirectory of
a subdirectory that doesn't exist.
4 Too many open files
When attempting to open a file for reading or writing, you can get this error when your program
has too many open files.
5 File access denied
You don't have access to the specified file.
6 Invalid file handle
If this happens, the file variable you are using is trashed; it indicates that your memory is
corrupted.
12 Invalid file access code
This will happen if you do a reset or rewrite of a file when FileMode is invalid.
15 Invalid drive number
The number given to the Getdir function specifies a non-existent disk.
16 Cannot remove current directory
You get this if you try to remove the current diirectory.
17 Cannot rename across drives
You cannot rename a file such that it would end up on another disk or partition.
100 Disk read error
DOS only. An error occurred when reading from disk. Typically when you try to read past the end
of a file.
101 Disk write error
DOS only. Reported when the disk is full, and you're trying to write to it.
102 File not assigned
This is reported by Reset, Rewrite, Append, Rename and Erase, if you call them with an unassigne
function as a parameter.
103 File not open
Reported by the following functions : Close , Read, Write, Seek, EOf, FilePos, FileSize, Flush,
BlockRead, and BlockWrite if the file isn't open.
104 File not open for input
Reported by Read, BlockRead, Eof, Eoln, SeekEof or SeekEoln if the file isn't opened with Reset.
105 File not open for output
Reported by write if a text file isn't opened with Rewrite.
106 Invalid numeric format
Reported when a non-numerice value is read from a text file, when a numeric value was expected.
150 Disk is write-protected
(Critical error, DOS only.)
151 Bad drive request struct length
(Critical error, DOS only.)
152 Drive not ready
(Critical error, DOS only.)
154 CRC error in data
(Critical error, DOS only.)
156 Disk seek error
(Critical error, DOS only.)
157 Unknown media type
(Critical error, DOS only.)
158 Sector Not Found
(Critical error, DOS only.)
159 Printer out of paper
(Critical error, DOS only.)
160 Device write fault
(Critical error, DOS only.)
161 Device read fault
(Critical error, DOS only.)
162 Hardware failure
(Critical error, DOS only.)
200 Division by zero
You are dividing a number by zero.
201 Range check error
If you compiled your program with range checking on, then you can get this error in the following
cases:
An array was accessed with an index outside its declared range.
Free Pascal Run Time Errors
1 Invalid function number
You tried to call a DOS function which doesn't exist.
2 File not found
You can get this error when you tried to do an operation on a file which doesn't exist.
3 Path not found
You can get this error when you tried to do an operation on a file which doesn't exist, or when
you try to change to, or remove a directory that doesn't exist, or try to make a subdirectory of
a subdirectory that doesn't exist.
4 Too many open files
When attempting to open a file for reading or writing, you can get this error when your program
has too many open files.
5 File access denied
You don't have access to the specified file.
6 Invalid file handle
If this happens, the file variable you are using is trashed; it indicates that your memory is
corrupted.
12 Invalid file access code
This will happen if you do a reset or rewrite of a file when FileMode is invalid.
15 Invalid drive number
The number given to the Getdir function specifies a non-existent disk.
16 Cannot remove current directory
You get this if you try to remove the current diirectory.
17 Cannot rename across drives
You cannot rename a file such that it would end up on another disk or partition.
100 Disk read error
DOS only. An error occurred when reading from disk. Typically when you try to read past the end
of a file.
101 Disk write error
DOS only. Reported when the disk is full, and you're trying to write to it.
102 File not assigned
This is reported by Reset, Rewrite, Append, Rename and Erase, if you call them with an unassigne
function as a parameter.
103 File not open
Reported by the following functions : Close , Read, Write, Seek, EOf, FilePos, FileSize, Flush,
BlockRead, and BlockWrite if the file isn't open.
104 File not open for input
Reported by Read, BlockRead, Eof, Eoln, SeekEof or SeekEoln if the file isn't opened with Reset.
105 File not open for output
Reported by write if a text file isn't opened with Rewrite.
106 Invalid numeric format
Reported when a non-numerice value is read from a text file, when a numeric value was expected.
150 Disk is write-protected
(Critical error, DOS only.)
151 Bad drive request struct length
(Critical error, DOS only.)
152 Drive not ready
(Critical error, DOS only.)
154 CRC error in data
(Critical error, DOS only.)
156 Disk seek error
(Critical error, DOS only.)
157 Unknown media type
(Critical error, DOS only.)
158 Sector Not Found
(Critical error, DOS only.)
159 Printer out of paper
(Critical error, DOS only.)
160 Device write fault
(Critical error, DOS only.)
161 Device read fault
(Critical error, DOS only.)
162 Hardware failure
(Critical error, DOS only.)
200 Division by zero
You are dividing a number by zero.
201 Range check error
If you compiled your program with range checking on, then you can get this error in the following
cases:
An array was accessed with an index outside its declared range.