[INTERPRETER]

* BUG: Now raise an error when a stream cannot be closed, instead of silently ignoring it.


git-svn-id: svn://localhost/gambas/trunk@7622 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2016-03-08 20:04:55 +00:00
parent 222a77cf16
commit 6cee32287c

View file

@ -291,8 +291,13 @@ void STREAM_close(STREAM *stream)
stop_watching(stream, GB_WATCH_NONE);
if (stream->common.standard || !(*(stream->type->close))(stream))
stream->type = NULL;
if (!stream->common.standard)
{
if ((*(stream->type->close))(stream))
THROW_SYSTEM(errno, "");
}
stream->type = NULL;
#if DEBUG_STREAM
_nopen--;