こんな感じかな。

try
 TIdHTTP.Get(http://);
except
on E: EIdSocketError do
 if E.LastError = 10060 then
end;