我们使用Delphi 7运行的软件通过电子邮件生成并向各利益相关方发送报告.在每天发送的大约30-40份报告中,每天有2-4份不同的报告因例外情况而失败:"EIdConnClosedGracefully"
我试图找出为什么会发生这种情况以及如何在代码中捕获它.这是我们到目前为止所拥有的:
try
// Code that Populates "mess" (a tIdMessage variable)
if (not nSMTP.Connected) then
begin
nSMTP.Connect;
end;
try
nSMTP.Send(mess);
except on E : Exception do
begin
resend := E.Message;
// AutoReports_ExceptionMessage is a string that holds the Exception message
AutoReports_ExceptionMessage := 'Attempt #1: ' + resend;
end;
end;
if (resend <> '') then // If there is an exception triggered, resend the email
begin
try
nSMTP.Send(mess);
except on E : Exception do
begin
resend := E.Message;
AutoReports_ExceptionMessage := …Run Code Online (Sandbox Code Playgroud) 我正在使用Delphi 7代码,以确保在用户可以切换选项卡之前已在选项卡上输入注释.
选项卡位于a上TPageControl,此代码被触发OnExit
procedure TfCallerInfo.tsChaplainExit(Sender: TObject);
begin
{ Compare the saved DB value with the text in the comments field }
if (dmMain.qChaplainCOMMENTS.AsString <> dbmChapComments.Text) then
begin
ShowMessage ('Please save the comments before proceeding.');
pcDetail.ActivePage := tsChaplain; // Remain on the Current Page
tsChaplain.SetFocus;
end;
end;
Run Code Online (Sandbox Code Playgroud)
tsInfoRequest例如,当用户单击另一个选项卡时,验证会触发,但活动页面将变为tsInfoRequest而不是保留tsChaplain.
知道我做错了什么吗?
我试图修复用Delphi 7编写的旧程序的一部分.
目前,我有正确的查询(和正确的结果),但我无法弄清楚如何在kbmMemtable中显示结果(这是应用程序的其余部分使用)
有关文件的任何想法/建议/链接?
在整个组织的计算机上部署了相同版本的Delphi 7 Code.
每次用户A访问计算机F1上的记录Z时,都会显示以下错误:
Access violation at address 00642E83 in module 'foo.exe'. Read of address 00000000
Run Code Online (Sandbox Code Playgroud)
我和我的用户在我自己的计算机上执行了相同的步骤,并且在另一台计算机上跟另一个人的用户执行了相同的步骤,并且无法复制它(因此无法调试...).
根据要求提供附加信息(不确定这将有多大帮助)
那么......
计算机F1似乎是罪魁祸首.但是,此时,我不确定如何进一步排除故障.
有什么建议?