Am 20.03.2013 um 13:57 hat Luiz Capitulino geschrieben: > On Wed, 20 Mar 2013 09:39:34 +0100 > Kevin Wolf <kw...@redhat.com> wrote: > > > Am 19.03.2013 um 21:34 hat Luiz Capitulino geschrieben: > > > inet_connect_addr() has two users: inet_connect_opts() and > > > wait_for_connect(), > > > with this patch both of them are now ignoring errors from > > > inet_connect_addr(). > > > > > > Suggested solution: refactor inet_connect_addr() to return an errno value. > > > Callers use error_set() when they want to report an error upward. > > > > Doesn't change the problem that you need to know when to set a return > > value != 0. So it doesn't help, but you'd lose some error information. > > My real point is that it's easier to check against errno to find out > the error cause (compared to using Error for that).
You mean if the caller has to distinguish between different error codes? I think I would agree that avoiding Error can be a good way then if it doesn't lose error information. If we would lose information, using error classes other than generic would be acceptable, right? In the specific case, I don't think the callers make any difference and all errors are just errors, so this is mostly about the theory. Kevin