Author: jonathan
Date: Sat Jul 26 05:39:09 2008
New Revision: 29753
Modified:
trunk/src/io/io.c
Log:
[core] When trying to write to a closed file handle, we should throw an
exception, not have an assertion failure. That way HLLs or programs can catch
it.
Modified: trunk/src/io/io.c
==============================================================================
--- trunk/src/io/io.c (original)
+++ trunk/src/io/io.c Sat Jul 26 05:39:09 2008
@@ -1044,7 +1044,8 @@
|| !VTABLE_isa(interp, pmc, CONST_STRING(interp, "ParrotIO")))
real_exception(interp, NULL, PIO_ERROR, "Cannot put to non-PIO PMC");
- PARROT_ASSERT(io);
+ if (!io)
+ real_exception(interp, NULL, PIO_ERROR, "Cannot put to a closed PIO
handle");
if (!s)
return 0;