Re: Open API Bugs, 28 September



From: Tor Lillqvist <tml iki fi>
>
> rsteinke w-link net writes:
>  > Notes: Someone who understands the win32 backend needs to check that
>  >        the GIOChannelError error messages which replaced the old
>  >        GIOError error messages make sense.
>  > 
>  > Several of the errors returned (particularly in g_io_win32_msg_[read,write]())
>  > were straight translations from GIOError to GIOChannelError when
>  > I did the major GIOChannel patches, and are probably not correct.
>  > I'm concerned that it may be necessary to add additional error
>  > types to the GIOChannelError enum. If someone who knows win32
>  > could look this over, I'd appreciate it.
>
> I am looking a bit at this now. When a Win32 API call has failed, the
> right thing is to call g_win32_error_message (GetLastError ()) and use
> that message. BTW, should error messages in giowin32.c be marked for
> translation? In giounix.c all g_set_error() us calls use strerror()
> which returns a translated string. In giochannel.c (for instance),
> some g_set_error() calls with stating messages have them marked,
> others not.

Go ahead and change these to whatever you feel is appropriate.
The current code was just put there to get win32 to compile after
the changes to the backend. The only concerns are to retain (as much as
possible) backward compatibility with the errors (GIOError) returned by
the old API (take a look at the function in giochannel.c that does this
before changing the error codes returned, though we can mess with the
conversion to try to maintain maximum compatibility), and make sure that
GIOChannelError has all the error codes we need.

Ron




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]