[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:
parent
222a77cf16
commit
6cee32287c
1 changed files with 7 additions and 2 deletions
|
@ -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--;
|
||||
|
|
Loading…
Reference in a new issue