[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: System calls without error checks in w32
From: |
Eli Zaretskii |
Subject: |
Re: System calls without error checks in w32 |
Date: |
Sun, 30 May 2010 06:02:40 +0300 |
> From: Lennart Borgman <address@hidden>
> Date: Sat, 29 May 2010 23:30:21 +0200
> Cc: address@hidden
>
> On Sat, May 29, 2010 at 11:25 PM, Eli Zaretskii <address@hidden> wrote:
> >> From: Lennart Borgman <address@hidden>
> >> Date: Sat, 29 May 2010 22:02:24 +0200
> >> Cc: address@hidden
> >>
> >> > If you can suggest what to do when any of these fails, please do.
> >>
> >>
> >> I have already made the suggestion below.
> >
> > How in the world outputting an error message would help here?
>
> You mean instead of fixing the error directly? It is just a first step
> of course.
>
> The error message might also be interesting in itself. It can for
> example tell about resources lack etc. The API descriptions does not
> always tell the whole story.
Checking values returned by system calls is necessary to avoid working
with invalid objects returned by a failed system call. I thought you
were talking about this.
But it turns out you are talking about something else altogether: how
to debug possible failures in some APIs. That is a different story
and it requires different solutions. Please take a look at xdisp.c
and friends, which have special debugging code inside
#ifdef GLYPH_DEBUG.
In any case, the solution you suggest is not a good one, because it
obfuscates the source code and makes it harder to read and understand.
- System calls without error checks in w32, Lennart Borgman, 2010/05/29
- Re: System calls without error checks in w32, Eli Zaretskii, 2010/05/29
- Re: System calls without error checks in w32, Lennart Borgman, 2010/05/29
- Re: System calls without error checks in w32, Eli Zaretskii, 2010/05/29
- Re: System calls without error checks in w32, Lennart Borgman, 2010/05/29
- Re: System calls without error checks in w32, Eli Zaretskii, 2010/05/29
- Re: System calls without error checks in w32, Lennart Borgman, 2010/05/29
- Re: System calls without error checks in w32,
Eli Zaretskii <=
- Re: System calls without error checks in w32, Lennart Borgman, 2010/05/29
- Re: System calls without error checks in w32, Eli Zaretskii, 2010/05/30
- Re: System calls without error checks in w32, Lennart Borgman, 2010/05/30
- Re: System calls without error checks in w32, Juanma Barranquero, 2010/05/30
- Re: System calls without error checks in w32, Lennart Borgman, 2010/05/30
- Re: System calls without error checks in w32, Juanma Barranquero, 2010/05/30
- Re: System calls without error checks in w32, Lennart Borgman, 2010/05/30
- Re: System calls without error checks in w32, Juanma Barranquero, 2010/05/30
- Re: System calls without error checks in w32, Lennart Borgman, 2010/05/30
- Re: System calls without error checks in w32, Juanma Barranquero, 2010/05/30