|Subject||Re: [IBO] Using TIB_SessionProps to catch exceptions|
> I have two datamodules but one application and no threadingThat sounds correct to me. That should be only the one (default)
> programmed. I do have multiple connections. I assume all of this
> connections belong to the same session if I read the helpfile
> correctly, thus I dont need more than one?
IB_Session in your situation and that is the one IB_SessionProps
should attach to.
If you put a breakpoint in TIB_SessionBase.HandleException (in
IB_Session.pas) you should be able to trace where things are going.
The FOnError event variable of the Session, called in
HandleException should be set by TIB_SessionProps.
> I have put some very simple code in the onerror event of theNot AFAIK. Indeed in the IBO website FAQ I can see a comment from
> TIB_SessionProps component. It gets compiled but never gets called
> why is that. I have put breakpoints on the entire procedure to check
> if it gets called. Is there some property that I must set first?
Jason explicitly saying this should work. (I've never tried it
> I have looked in the help file... Almost none of the properties ofTIBOQuery is the TDataset variation and the documentation was not
> a TIBOQuery have any explanations of what they do.
duplicated into that stream. To get explanation of the various
IBO specific properties lookup TIB_Query and see the properties
there. (And for VCL properties lookup TDataset.)
> If I have centralised exception handling in the form of aThis is where everything gets rather confusing.
> TIB_SessionProps and I have a OnPostError for a TIBOQuery, does both
> get called and if so who first or does only one get called.
The various OnError handlers only apply to server based errors
(TIB_ISCError exception class). IBO does generate some of its own
exceptions as well, that dont go through this mechanism.
ISCErrors get passed to the OnError handler right after the API
call, soe the OnError handlers get to see the problem first.
The OnPostError happens well outside the API call, so it will
receive any errors only after the session OnError has been
processed. It may also see some errors that IB_Session.OnError
never sees - since it will also see non API errors.