From 1005fa8abf16311cbab8cd9775f521e8dad03c04 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Fri, 12 Jun 2009 13:46:44 -0500 Subject: [PATCH] PLIOError should not prevent weird errors, like resource_errors (#36). --- C/iopreds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C/iopreds.c b/C/iopreds.c index 4a2af976b..943d6afcc 100644 --- a/C/iopreds.c +++ b/C/iopreds.c @@ -536,7 +536,8 @@ Yap_InitPlIO (void) static Int PlIOError (yap_error_number type, Term culprit, char *who) { - if (Yap_GetValue(AtomFileerrors) == MkIntTerm(1)) { + if (Yap_GetValue(AtomFileerrors) == MkIntTerm(1) || + type == RESOURCE_ERROR_MAX_STREAMS /* do not catch resource errors */) { Yap_Error(type, culprit, who); /* and fail */ return FALSE;