Bảng lỗi của Free Pascal

Chia sẻ bởi Nguyễn Hải Đảo | Ngày 14/10/2018 | 51

Chia sẻ tài liệu: Bảng lỗi của Free Pascal thuộc Tin học 8

Nội dung tài liệu:

Run-time errors

Applications generated by Free Pascal might generate run-time errors when certain abnormal conditions
are detected in the application. This appendix lists the possible run-time errors and gives
information on why they might be produced.

1. Invalid function number: An invalid operating system call was attempted. 2. File not found: Reported when trying to erase, rename or open a non-existent file. 3. Path not found: Reported by the directory handling routines when a path does not exist or is invalid. Also reported when trying to access a non-existent file. 4. Too many open files: The maximum number of currently opened files by your process has been reached. Certain operating systems limit the number of files which can be opened concurrently, and this error can occur when this limit has been reached. 5. File access denied: Permission accessing the file is denied. This error might be caused by several reasons:
Trying to open for writing a file which is read only, or which is actually a directory. File is currently locked or used by another process. Trying to create a new file, or directory while a file or directory of the same name already exists. Trying to read from a file which was opened in write only mode. Trying to write from a file which was opened in read only mode. Trying to remove a directory or file while it is not possible. No permission to access the file or directory.
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: Reported when a reset or rewrite is called with an invalid FileMode value. 15. Invalid drive number: The number given to the Getdir or ChDir function specifies a non-existent disk.
16. Cannot remove current directory: Reported when trying to remove the currently active directory. 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: An error occurred when reading from disk. Typically when you try to read past the end of a file. 101. Disk write error: 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 unassigned file 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 is not open. 104. File not open for input: Reported by Read, BlockRead, Eof, Eoln, SeekEof or SeekEoln if the file is not 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-numeric value is read from a text file, when a numeric value was expected.
150. Disk is write-protected: (Critical error) 151. Bad drive request struct length: (Critical error) 152. Drive not ready: (Critical error) 154. CRC error in data: (Critical error) 156. Disk seek error: (Critical error) 157. Unknown media type: (Critical error) 158. Sector Not Found: (Critical error) 159. Printer out of paper: (Critical error) 160. Device write fault: (Critical error) 161. Device read fault: (Critical error) 162 Hardware failure: (Critical error) 200. Division by zero: The application attempted to divide 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. Trying to assign a value to a variable outside its range (for instance an enumerated type). 202. Stack overflow error: The stack has grown beyond its maximum size (in which case the size of local variables should be reduced to avoid this error), or the stack has become corrupt. This error is only reported when stack checking is enabled. 203. Heap overflow error: The heap has grown beyond its boundaries. This is caused when trying to allocate memory exlicitly with New, GetMem or ReallocMem, or when a class or object instance is created and no memory is left. Please note that, by default, Free Pascal provides a growing heap, i.e. the heap will try to allocate more memory if needed. However, if the heap has reached the maximum size allowed by the operating system or hardware, then you will get this error. 204. Invalid pointer operation: This you will get if you call Dispose or Freemem with an invalid pointer (notably,
* Một số tài liệu cũ có thể bị lỗi font khi hiển thị do dùng bộ mã không phải Unikey ...

Người chia sẻ: Nguyễn Hải Đảo
Dung lượng: 33,00KB| Lượt tài: 2
Loại file: doc
Nguồn : Chưa rõ
(Tài liệu chưa được thẩm định)