Where is EIBCError

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for InterBase & Firebird in Delphi and C++Builder
Post Reply
rmunoz
Posts: 2
Joined: Thu 25 Sep 2014 19:09

Where is EIBCError

Post by rmunoz » Fri 01 Dec 2017 00:09

Hi,

I'm trying to handle an EIBCError raised by DevartInterbase driver using Delphi try...except, but I can not compile because I don't know where is the definition of EIBCError. I assumed it was in DBXDevartInterBase*.dcu (5 files), but not.

TIA,
Ricardo

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Where is EIBCError

Post by ViktorV » Fri 01 Dec 2017 09:09

EIBCError is the internal driver exception. It is raised and then catched inside the driver. So there is nothing to catch for you.

rmunoz
Posts: 2
Joined: Thu 25 Sep 2014 19:09

Re: Where is EIBCError

Post by rmunoz » Fri 01 Dec 2017 15:41

May be, but my application receive a exception whose ClassName is EIBCError. It is raised when the App tries to reconnect to a Firebird server whose connection was lost (network problem, server shutdown...).

something like this

Code: Select all

try
while true do
begin
  MySQLQuery.ExecSQL;
  sleep(1000);
  ...
// during this loop Firebird server is shutdown
end;
except
  on E: TDBXError do DoReconex;
end;

...

procedure DoReconex;
begin
  for i:=1 to NumberOfRetries do
  begin
    try
      MySQLConnection.Connected := False;
    except
       // Do nothing
    end;
    try
      MySQLConnection.Open;
    except
      on E: Exception do
        LogMessage('E.ClassName: '+ E.ClassName+' E.Message:'+ E.Message);

// here E.ClassName = 'EIBCError'
// E.Message is equal tan previous TDBXError: Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements
connection shutdown

// if you test this case with dbexpsda and SQLServer E.ClassName = 'TDBXError'
// until SQLServer runs again and the reconnection is successful

    end;
  end;
end;
TIA,
Ricardo

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Where is EIBCError

Post by ViktorV » Mon 04 Dec 2017 10:14

Unfortunately, we could not reproduce the issue. When executing the specified code, ClassName equals TDBXError, but not EIBCError.
Please compose a full sample demonstrating the described behavior and send it to us to us via e-support form: https://www.devart.com/company/contactform.html, including scripts for creating database objects. Also, please specify Firebird and IDE versions you are using.

Post Reply