Re: [PATCH] to remove exit statements from libct
Frediano Ziglio <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
2010/2/28 David Dick <[email protected]>: > On 01/03/10 08:44, Christos Zoulas wrote: >> On Mar 1, 8:18am, [email protected] (David Dick) wrote: >> -- Subject: Re: [freetds] [PATCH] to remove exit statements from libct >> >> | On 01/03/10 00:56, Frediano Ziglio wrote: >> |> Hi, >> |> some calls check internal behaviour witch should not raise (unless >> |> in situations where an exit is really necessary). However login and >> |> token should not exit as you detect correctly. I'll apply a modified >> |> version. >> | >> | So the remaining exits would designate a client programming error as >> | distinct from a server programming error / protocol error? >> >> Libraries should not exit; they should indicate the reason for the error, >> and generally avoid printing to stderr. The source of the error is really >> not relevant. > > 100% agreed, i'm just trying to understand if any exit statements are > going to be left in the libct library and if so, why. Well... I removed 3 of the exit you spot. Think about asserts, they exit application if they don't pass. I agree to remove any print statements and I removed a lot. There are however situations when even the os kernel "exit" (that is stop the entire system). In this case if an internal handler returns any values which are not coded to return some nasty things happen and I don't see any point in keeping going. freddy77 _______________________________________________ FreeTDS mailing list [email protected] http://lists.ibiblio.org/mailman/listinfo/freetds