Page 1 of 1

capture ESocketError, host has failed to respond

Posted: Mon 09 Jun 2008 13:21
by BoOmSoLuTioN
hello,

please, how to capture Exception ESocketError (10060), host has failed to respond


i try this but is not work :

Code: Select all

  try
      cnx.ConnectString:='login/[email protected]:1521:BIZ';
      cnx.Connect;
  Except on E: ESocketError  do
        begin
             showmessage('Error; Enable to connect!');
        end;
  end;

cnx : is a TOraSession Compenent.

thanx.

Posted: Tue 10 Jun 2008 07:04
by Plash
Try to catch EOraError:

Code: Select all

try
...
except
  on E: EOraError do begin
    ShowMessage('Error; Enable to connect!'); 
  end; 
end;
You should add OraError unit to 'uses'.

If this does not work, you can get actual type of exception using the following code:

Code: Select all

try
...
except
  on E: Exception do begin
    ShowMessage(E.ClassName); 
  end; 
end;