freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] 0.82 RC4 assert(0) on failed to connect
- From: Dossy Shiobara <dossy AT panoptic.com>
- To: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] 0.82 RC4 assert(0) on failed to connect
- Date: Mon, 21 Apr 2008 11:12:44 -0400
On 2008.04.21, James K. Lowden <jklowden AT freetds.org> wrote:
> This is actually a specific instance of the general purpose of each
> library's "handler handler". Each library defines its own way to deal
> with timeouts, and libtds doesn't care which client library happens to be
> in use; it has its own callback specification. It's the job of the
> "handler handler" to wrap the caller's handler (if any) and provide
> conforming behavior for libtds.
>
> Hope that's clear!
Yup, absolutely clear ... probably because I'd already read all the
related code. :-)
> > Yes, I realize that direct use of libtds isn't supported, but this
> > caught me by surprise.
>
> I'm sure. Over the last year or two I've worked to rationalize error
> handling. The philosophy is that most error detection and handling should
> be done by the client library, and libtds can expect to be called
> correctly. Life is simpler that way.
Absolutely. This was just a change from 0.64 to 0.82 that I wasn't
expecting ...
> For the sake of a framework, let's say errors are of two kinds: logical
> and runtime. Runtime errors -- server not available, library misuse --
> cannot be handled at compile time. They provoke error messages that
> inform the user what went wrong. Logical errors are bugs embedded in the
> code that can be prevented by testing, etc. They are handled more simply:
> with a log message (maybe) and an assertion. (I'm excluding server
> messages -- bad SQL, etc. -- because they're not errors insofar as the
> library is concerned. They're just data.)
It would be nice if in the TDSMESSAGE structure there was an "error
code" passed along. Having to parse the error message string (esp. once
things get localized, yow!) to deduce "what went wrong" is going to be
very ... painful.
--
Dossy Shiobara | dossy AT panoptic.com | http://dossy.org/
Panoptic Computer Network | http://panoptic.com/
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)
-
[freetds] 0.82 RC4 assert(0) on failed to connect,
Dossy Shiobara, 04/20/2008
-
Re: [freetds] 0.82 RC4 assert(0) on failed to connect,
Dossy Shiobara, 04/20/2008
-
Re: [freetds] 0.82 RC4 assert(0) on failed to connect,
James K. Lowden, 04/21/2008
-
Re: [freetds] 0.82 RC4 assert(0) on failed to connect,
Dossy Shiobara, 04/21/2008
- Re: [freetds] 0.82 RC4 assert(0) on failed to connect, James K. Lowden, 04/21/2008
-
Re: [freetds] 0.82 RC4 assert(0) on failed to connect,
Dossy Shiobara, 04/21/2008
-
Re: [freetds] 0.82 RC4 assert(0) on failed to connect,
James K. Lowden, 04/21/2008
-
Re: [freetds] 0.82 RC4 assert(0) on failed to connect,
Dossy Shiobara, 04/20/2008
Archive powered by MHonArc 2.6.24.