procedure VerifyWrite(Stream: TStream; var Buffer; Count: Integer); begin if Stream.Write(Buffer,Count) <> Count then raise EZipException.CreateRes(@SZipErrorWrite) at ReturnAddress; end;
这是在ReturnAddress部分,令我难以置信。
我不知道那是一个有效的关键字(语法荧光笔似乎也不认识它)。
根据IDE,它被声明为System.ReturnAddress,但是我只能在程序_HandleAnyException的(asm)代码中找到它被声明为一个标签。系统单元充满了对它的引用。
所以我想知道的是这样的:
什么是ReturnAddress?
>什么是提升Exception.Create …在ReturnAddress?
解决方法
提升异常。在ReturnAddress中创建…意味着当显示异常对话框时,它会将异常的地址指示为ReturnAddress。换句话说,异常消息将读取Exception< whatever>在< ReturnAddress> ;:<异常消息> ;. 这是Delphi 7的帮助文件的摘录。它几乎和the online version相同。
To raise an exception object,use an instance of the exception
class with a raise statement. For example,06000
In general,the form of a raise statement is
06001
where object and at address are both optional; see
Re-raising exceptions. When an address is specified,
it can be any expression that evaluates to a pointer
type,but is usually a pointer to a procedure or function.
For example:06002
Use this option to raise the exception from an earlier point
in the stack than the one where the error actually occurred.
注意最后一句话。关于使用< address>