freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Lenon Kitchens <lenonk AT sanctuary.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] FreeTDS, C++, and Exceptions
- Date: Sat, 17 Jun 2006 13:13:54 -0400
Frediano Ziglio wrote:
:( this is bad C++... a C callback implemented in C++ should not throwThat was actually my first solution. The problem with it is that sometimes after calling the callback functions FreeTDS calls abort() and never returns control to my library. This is absolutely unacceptable. Because my library is actually loaded and used by TCL code that doesn't necessarily fail after a bad SQL execution, I must eventually return control to the TCL script in every scenario. Therefore, saving an error (an exception in my case) and throwing it after the FreeTDS call that caused an error is unreliable at best.
exceptions... C do not support unwinding so you are doing something
wrong. You could recompile all FreeTDS using a C++ compiled but code is
not exception safe (cause C do not support exception) so you would
convert a core in leaks... you should save error in a place, and outside
FreeTDS detect this error and throw exception.
bye
freddy77
Any other solutions to this problem?
Thanks,
Lenon
-
[freetds] FreeTDS, C++, and Exceptions,
Lenon Kitchens, 06/17/2006
-
Re: [freetds] FreeTDS, C++, and Exceptions,
Frediano Ziglio, 06/17/2006
-
Re: [freetds] FreeTDS, C++, and Exceptions,
Lenon Kitchens, 06/17/2006
- Re: [freetds] FreeTDS, C++, and Exceptions, Bort, Paul, 06/17/2006
-
Re: [freetds] FreeTDS, C++, and Exceptions,
Lenon Kitchens, 06/17/2006
-
Re: [freetds] FreeTDS, C++, and Exceptions,
James K. Lowden, 06/18/2006
- Re: [freetds] FreeTDS, C++, and Exceptions, Lenon Kitchens, 06/18/2006
-
Re: [freetds] FreeTDS, C++, and Exceptions,
Frediano Ziglio, 06/17/2006
Archive powered by MHonArc 2.6.24.