mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 14:42:10 +01:00
Improve error on win32input/output streams
This commit is contained in:
parent
99b30f389e
commit
bc5b7332b7
@ -210,9 +210,12 @@ g_win32_input_stream_close (GInputStream *stream,
|
|||||||
{
|
{
|
||||||
if (close (win32_stream->priv->fd) < 0)
|
if (close (win32_stream->priv->fd) < 0)
|
||||||
{
|
{
|
||||||
g_set_error_literal (error, G_IO_ERROR,
|
int errsv = errno;
|
||||||
g_io_error_from_errno (errno),
|
|
||||||
g_strerror (errno));
|
g_set_error (error, G_IO_ERROR,
|
||||||
|
g_io_error_from_errno (errsv),
|
||||||
|
_("Error closing file descriptor: %s"),
|
||||||
|
g_strerror (errsv));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -197,9 +197,12 @@ g_win32_output_stream_close (GOutputStream *stream,
|
|||||||
{
|
{
|
||||||
if (close (win32_stream->priv->fd) < 0)
|
if (close (win32_stream->priv->fd) < 0)
|
||||||
{
|
{
|
||||||
g_set_error_literal (error, G_IO_ERROR,
|
int errsv = errno;
|
||||||
g_io_error_from_errno (errno),
|
|
||||||
g_strerror (errno));
|
g_set_error (error, G_IO_ERROR,
|
||||||
|
g_io_error_from_errno (errsv),
|
||||||
|
_("Error closing file descriptor: %s"),
|
||||||
|
g_strerror (errsv));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user