2023年12月7日发(作者:)
Run time errors
Free Pascal生成的应用程序也许会生成一些运行错误,当应用程序发现某个确定的异常情况时,这里列出了错误代码,并且解释产生的原因.
1 Invalid function number
错误的功能代码
尝试错误的操作系统调用.也有可能是程序名称中含中文或括号。
2 File not found
文件未找到
程序试图删除(erase),重命名( rename),打开(open)一个在路径中不存在或类型不匹配的文件.
3 Path not found
目录未发现
目录不存在或是错误.也有可能是访问一个不存在的文件.
4 Too many open files
打开太多的文件
当前你的程序当前打开的文件太多咯.超过了操作系统允许打开的最多文件数.
5 File access denied
文件访问拒绝
访问文件拒绝.引起这个错误可能是下面几个原因:
试图写一个只读文件,或者实际上是一个目录.
文件正在为其他程序所使用.
试图建立一个目录中已经存在的文件名的文件.
试图从一个只能写的文件中读数据.
试图从一个只能读的文件中写数据.
试图移除一个不存在的文件或目录.
不允许访问这个文件或者目录.
6 Invalid file handle
错误的文件句柄
表示你的文件表示符已经失效; 指出你的内存已经混乱.
12 Invalid file access code
错误的文件访问代码
reset 或 rewrite 使用一个错误的文件模式值.
15 Invalid drive number
错误的驱动器数字
Getdir或者ChDir函数所使用数字指向了一个不存在的磁盘.
16 Cannot remove current directory
不能移动当前目录
试图移除的目录是当前活动目录..
17 Cannot rename across drives
不能跨越驱动器更改文件名
你不能重命名一个文件,它可能在另一个磁盘或分区或目录.
18 No more files 没有文件了
100 Disk read error
磁盘读错误
从磁盘读数据时错误.具有代表性的是你读文件超过了文件结尾.
101 Disk write error
磁盘写错误
磁盘已经满咯,可是你还试图写入数据..
102 File not assigned
文件未曾建立关联
使用Reset, Rewrite, Append, Rename和 Erase 之前你必须已经将文件标识符与磁盘文件建立关联,即assign.
103 File not open
文件未打开
在使用 Close, Read, Write, Seek, EOf, FilePos, FileSize, Flush,
BlockRead, and BlockWrite 之前未打开文件.
104 File not open for input
文件不能打开读数据
在使用 Read, BlockRead, Eof, Eoln, SeekEof or SeekEoln 之前文件未使用Reset打开.
105 File not open for output
文件不能打开写数据
使用write之前未使用Rewrite打开.
106 Invalid numeric format
错误的数字格式
从标准输入(Text文件)中预期得到的数字格式不对.输入的数据的类型与承接的变量类型不匹配。Out的工作原理。试着将输入的东西输出来,看看哪里错了。但有时是废话……
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
数据CRC校检错误
(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
被除数为0.
201 Range check error
如果你编译你的程序时设置了范围检查,原因有可能是:
数组访问超过了声明的范围.
试图给一个变量赋值超过其范围(例如枚举类型).
常见原因:
(1) 搜索时条件设置不足。
(2)
Function返回值超过赋给的变量的范围。
202 Stack overflow error
栈溢出 简称死循环/爆空间
栈增长超过了最大值 (in which case the size of local variables should be
reduced to avoid this error), or the stack has become corrupt. 只有当栈检查时才出现该错误.
常见于递归和循环中,原因是终止条件无法满足,或递归状态没有改变。
203 Heap overflow error
堆溢出,堆增长超过了上界. 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错误的指针操作
使用 Dispose or Freemem 时使用错误的指针 (特别的, Nil)
205 Floating point overflow浮点数上溢
你试图使用或产生一个太大实数.
206 Floating point underflow你试图使用或产生一个太小实数.
207 Invalid floating point operation错误的浮点数操作
可能是你开平方根或者对数时使用负数.
208 Overlay manager not installed 未安装覆盖管理程序
209 Overlay file read error 读覆盖文件错误
210 Object not initialized对象没有进行初始化。
当进行数限编译(range checking on)时,对一个对象(参数/过程/函数?)没有进行构造。
211 Call to abstract method进行了不具体的操作(method)。你的程序打算进行一个实际上并不具体的操作。
Your program tried to execute an abstract virtual method. Abstract methods
should be overridden, and the overriding method should be called.
212 Stream registration error一个非法的类型在对象单元里进行了注册。
This occurs when an invalid type is registered in the objects unit.
213 Collection index out of range集合下标越界
You are trying to access a collection item with an invalid index (objects
unit).
214 Collection overflow error集合溢出
The collection has reached its maximal size, and you are trying to add
another element (objects unit).
215 Arithmetic overflow error四则运算超限,算术上溢错误。计算时中间或最终结果越界。
This error is reported when the result of an arithmetic operation is outside of
its supported range. Contrary to Turbo Pascal, this error is only reported for
32-bit or 64-bit arithmetic overflows. This is due to the fact that everything
is converted to 32-bit or 64-bit before doing the actual arithmetic operation.
216 General Protection fault 一般保护错误。试图申请非法内存。如:尊重空指针(疑为deferent(输出)。原文如此。);试图申请超出界限的内存(如非法长度);存取非法。不用想了,重编吧。
The application tried to access invalid memory space. This can be caused by
several problems:
Deferencing a nil pointer
Trying to access memory which is out of bounds (for example, calling move
with an invalid length).
217 Unhandled exception occurred 未经处理的例外发生了。
An exception occurred, and there was no exception handler present. The
sysutils unit installs a default exception handler which catches all excpetions
and exits gracefully.
218 授权指令。
219 Invalid typecast 非法的typecast
Thrown when an invalid typecast is attempted on a class using the as
operator. This error is also thrown when an object or class is typecast to an
invalid class or object and a virtual method of that class or object is called.
This last error is only detected if the -CR compiler option is used.
220 无效的变体typecast
221无效的变体操作
222没有变体方法调用dispatcher
223不能建立变体数组
224变体不包含数组
225变体数组边界错误
226TLS初始化错误
227 Assertion failed error assertion失败错误。
An assertion failed, and no AssertErrorProc procedural variable was
installed.


发布评论