Subject RE: [IBO] info about error handling
Author Maik Wojcieszak
Thanks's for the url I found a lot of helpful stuff about
a lot of topics.

It seems for me that the IB_Exception and it's direct subclasses are
decendents of the Exception class in delphi and contain no information
about the error wich was returned by the api.

I will describe my problem more specefic.

My application has a set of function wich are writing and
reading data to and from a database using IB_Query,IB_Dsql,IB_StoredProc
In normally I start a transaction and call a bunch of functions.
If one of those functions fail I rollback the whole transaction and
write an error into a log - no user can repeat this automatic process
the data is lost.

Normally this is no problem because the interface works pretty good and
no errors happen.

Now I have number of applications doing stuff at the same time
without sync. The only problem happening is the deadlock error.

Now I want to build an error handling into the writing functions wich
will repeat the call automatically after a deadlock until it succeeds.

- Can I use one transaction for multiple function calls at a time and
recover only the failed function ? (How)
- Or do I have to use a transaction for each function ?
- How can I get information about the Errorcode in the except block
of my try-except statement ?
- do I think in the correct direction or do I have to change my strategy
to solve this problem ?

thanks
maik

On Wed, 20 Nov 2002 12:21:13 +0100, Thomas Steinmaurer wrote:

>The "Handling Exceptions" Tech Info Sheet on Jason's website
>might be useful. http://www.ibobjects.com/TechInfo.html
>
>
>
>Regards,
>Thomas Steinmaurer
>IB LogManager 2.1 - The Logging/Auditing Tool for InterBase and Firebird
>http://www.iblogmanager.comThomas
>
>> -----Original Message-----
>> From: Maik Wojcieszak [mailto:mw@...]
>> Sent: Wednesday, November 20, 2002 12:05 PM
>> To: IBObjects
>> Subject: [IBO] info about error handling
>>
>>
>> Hi,
>>
>> I'm using the OnIBError event function to handle errors at the moment.
>> This is enough for my global error handling.
>>
>> Now I want to implement a more detailed error handling using the
>> IBException Classes in a way like
>>
>> try
>> do something with a query,dsql,etc
>> commit
>> except
>> on E: Exception do ...
>> ...
>> rollback
>> handle errors
>> end;
>>
>> are there any examples, wich exception class is raised,
>> how can I get the Errorcode ???
>>
>> If there is any information about that, where can I find it. In the Helpfiles
>> I found the description of the Exception classes but thats all ;-(
>>
>> thanks in advance
>> maik
>>
>>
>> -------------------------------------------------
>> Maik Wojcieszak
>>
>> wobe-team (http://www.wobe-team.com)
>>
>>
>>
>>
>> ___________________________________________________________________________
>> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
>> without the need for BDE, ODBC or any other layer.
>> ___________________________________________________________________________
>> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
>> keyword-searchable FAQ, community code contributions and more !
>>
>> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>>
>>
>>
>
>
>
>___________________________________________________________________________
>IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
>___________________________________________________________________________
>http://www.ibobjects.com - your IBO community resource for Tech Info papers,
>keyword-searchable FAQ, community code contributions and more !
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


-------------------------------------------------
Maik Wojcieszak

wobe-team (http://www.wobe-team.com)