View Full Version : Eurekalog raises exceptions that Delphi doesn't
Dominic Dumée
28-Nov-2005, 05:36 AM
Delphi does not raise an exception for the following code while Eurekalog
does:
// an exception is raised if the table being dropped does not exist...
query1.sql.text := 'drop table TempTable'
try
query1.execsql;
except
end;
To get Eurekalog to not raise the exception I have to change the code to:
query1.sql.text := 'drop table TempTable'
try
query1.execsql;
except
on e : exception do
;
end;
Is there a way to stop Eurekalog from raising exceptions in such cases
without having to check and update every try/except in a project?
Thanks
Dominic
admin
28-Nov-2005, 09:30 AM
Hi,
Dominic Dumée wrote:
> Delphi does not raise an exception for the following code while Eurekalog
> does:
>
> // an exception is raised if the table being dropped does not exist...
> query1.sql.text := 'drop table TempTable'
> try
> query1.execsql;
> except
> end;
>
> To get Eurekalog to not raise the exception I have to change the code to:
>
> query1.sql.text := 'drop table TempTable'
> try
> query1.execsql;
> except
> on e : exception do
> ;
> end;
>
> Is there a way to stop Eurekalog from raising exceptions in such cases
> without having to check and update every try/except in a project?
>
> Thanks
> Dominic
I have just tried your code with the last EurekaLog 5.0.6 RC 6 and all
works fine.
Try with this version please, and if the error did not disappears then
create a little source demo capable to reproduce it, ok? :)
--
Best regards...
Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG showing line n.
Dominic Dumée
28-Nov-2005, 10:14 AM
Sorry, forgot to mention that this behaviour only seems to occur with
TClientDataSets connecting to a remote data module. In my environment I'm
connecting via the Borland socket server. The exception is generated on the
server side and sent to the client app. If I configure EL to ignore
EOleExceptions then the errors stop being reported, but so do other server
side errors that I would want to be caught.
"admin" <support@eurekalog.com> wrote in message
news:dmem5m$b8p$3@plesk.eurekalog.com...
> Hi,
>
> Dominic Dumée wrote:
>> Delphi does not raise an exception for the following code while Eurekalog
>> does:
>>
>> // an exception is raised if the table being dropped does not exist...
>> query1.sql.text := 'drop table TempTable'
>> try
>> query1.execsql;
>> except
>> end;
>>
>> To get Eurekalog to not raise the exception I have to change the code to:
>>
>> query1.sql.text := 'drop table TempTable'
>> try
>> query1.execsql;
>> except
>> on e : exception do
>> ;
>> end;
>>
>> Is there a way to stop Eurekalog from raising exceptions in such cases
>> without having to check and update every try/except in a project?
>>
>> Thanks
>> Dominic
>
> I have just tried your code with the last EurekaLog 5.0.6 RC 6 and all
> works fine.
>
> Try with this version please, and if the error did not disappears then
> create a little source demo capable to reproduce it, ok? :)
>
> --
> Best regards...
>
> Fabio Dell'Aria.
> ----------------
> http://www.eurekalog.com
> Catch every BUG showing line n.
admin
28-Nov-2005, 10:35 AM
Hi,
Dominic Dumée wrote:
> Sorry, forgot to mention that this behaviour only seems to occur with
> TClientDataSets connecting to a remote data module. In my environment I'm
> connecting via the Borland socket server. The exception is generated on the
> server side and sent to the client app. If I configure EL to ignore
> EOleExceptions then the errors stop being reported, but so do other server
> side errors that I would want to be caught.
>
> "admin" <support@eurekalog.com> wrote in message
> news:dmem5m$b8p$3@plesk.eurekalog.com...
>> Hi,
>>
>> Dominic Dumée wrote:
>>> Delphi does not raise an exception for the following code while Eurekalog
>>> does:
>>>
>>> // an exception is raised if the table being dropped does not exist...
>>> query1.sql.text := 'drop table TempTable'
>>> try
>>> query1.execsql;
>>> except
>>> end;
>>>
>>> To get Eurekalog to not raise the exception I have to change the code to:
>>>
>>> query1.sql.text := 'drop table TempTable'
>>> try
>>> query1.execsql;
>>> except
>>> on e : exception do
>>> ;
>>> end;
>>>
>>> Is there a way to stop Eurekalog from raising exceptions in such cases
>>> without having to check and update every try/except in a project?
>>>
>>> Thanks
>>> Dominic
>> I have just tried your code with the last EurekaLog 5.0.6 RC 6 and all
>> works fine.
>>
>> Try with this version please, and if the error did not disappears then
>> create a little source demo capable to reproduce it, ok? :)
>>
>> --
>> Best regards...
>>
>> Fabio Dell'Aria.
>> ----------------
>> http://www.eurekalog.com
>> Catch every BUG showing line n.
What EurekaLog version do you use?
--
Best regards...
Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG showing line n.
Dominic Dumée
28-Nov-2005, 02:03 PM
Here's a workaround I'm using at the moment:
procedure MyExceptionNotify(
EurekaExceptionRecord: TEurekaExceptionRecord; var Handled: Boolean);
var
E : EOleException;
begin
// turn off EL if we get an OLE Error (from midas app server)
// and reraise exception so standard Delphi handler will pick it up
if EurekaExceptionRecord.ExceptionObject is EOleException then
begin
E := EOleException(EurekaExceptionRecord.ExceptionObjec t);
Handled := false;
SetEurekaLogState( FALSE ); // turn el off...
try
Raise EOleException.Create(E.Message, E.ErrorCode, E.Source,
E.HelpFile, E.HelpContext); // reraise...
finally
SetEurekaLogState( TRUE );
end;
end;
end;
this sorts the problem of EL displaying EOleExceptions that are already in
try/except blocks...
The problem is that we can't use the nice EL functionality for unhandled
EOleExceptions... :(
"admin" <support@eurekalog.com> wrote in message
news:dmeq00$gs1$1@plesk.eurekalog.com...
> Hi,
>
> Dominic Dumée wrote:
>> Sorry, forgot to mention that this behaviour only seems to occur with
>> TClientDataSets connecting to a remote data module. In my environment I'm
>> connecting via the Borland socket server. The exception is generated on
>> the server side and sent to the client app. If I configure EL to ignore
>> EOleExceptions then the errors stop being reported, but so do other
>> server side errors that I would want to be caught.
>>
>> "admin" <support@eurekalog.com> wrote in message
>> news:dmem5m$b8p$3@plesk.eurekalog.com...
>>> Hi,
>>>
>>> Dominic Dumée wrote:
>>>> Delphi does not raise an exception for the following code while
>>>> Eurekalog does:
>>>>
>>>> // an exception is raised if the table being dropped does not exist...
>>>> query1.sql.text := 'drop table TempTable'
>>>> try
>>>> query1.execsql;
>>>> except
>>>> end;
>>>>
>>>> To get Eurekalog to not raise the exception I have to change the code
>>>> to:
>>>>
>>>> query1.sql.text := 'drop table TempTable'
>>>> try
>>>> query1.execsql;
>>>> except
>>>> on e : exception do
>>>> ;
>>>> end;
>>>>
>>>> Is there a way to stop Eurekalog from raising exceptions in such cases
>>>> without having to check and update every try/except in a project?
>>>>
>>>> Thanks
>>>> Dominic
>>> I have just tried your code with the last EurekaLog 5.0.6 RC 6 and all
>>> works fine.
>>>
>>> Try with this version please, and if the error did not disappears then
>>> create a little source demo capable to reproduce it, ok? :)
>>>
>>> --
>>> Best regards...
>>>
>>> Fabio Dell'Aria.
>>> ----------------
>>> http://www.eurekalog.com
>>> Catch every BUG showing line n.
>
> What EurekaLog version do you use?
>
> --
> Best regards...
>
> Fabio Dell'Aria.
> ----------------
> http://www.eurekalog.com
> Catch every BUG showing line n.
Dominic Dumée
28-Nov-2005, 02:29 PM
Oh, to answer your first question:
Tried 5.0.5 and then new version 5.0.6 RC6 with same problems
Also, the EOleExceptions get raised and displayed by EL no matter how I
rewrite the exception code (I orignially said that by putting in a on e :
exception bit it solved the problem but I was a little confused at the time)
;)
admin
29-Nov-2005, 07:35 AM
Hi,
Dominic Dumée wrote:
> Oh, to answer your first question:
> Tried 5.0.5 and then new version 5.0.6 RC6 with same problems
>
> Also, the EOleExceptions get raised and displayed by EL no matter how I
> rewrite the exception code (I orignially said that by putting in a on e :
> exception bit it solved the problem but I was a little confused at the time)
> ;)
It isn't a bug but an EurekaLog standard behavior.
See the following thread for further details:
http://news.eurekalog.com/showthread.php?t=95
I hope to have answered to your question. :)
--
Best regards...
Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG, every time!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.