[svn:parrot] r49679 - trunk/src/io

nwellnhof at svn.parrot.org nwellnhof at svn.parrot.org
Mon Oct 25 23:21:47 UTC 2010


Author: nwellnhof
Date: Mon Oct 25 23:21:47 2010
New Revision: 49679
URL: https://trac.parrot.org/parrot/changeset/49679

Log:
[io] Throw exception on read error

Modified:
   trunk/src/io/unix.c

Modified: trunk/src/io/unix.c
==============================================================================
--- trunk/src/io/unix.c	Mon Oct 25 22:46:24 2010	(r49678)
+++ trunk/src/io/unix.c	Mon Oct 25 23:21:47 2010	(r49679)
@@ -525,8 +525,8 @@
               case EINTR:
                 continue;
               default:
-                s->bufused = s->strlen = 0;
-                return bytes;
+                Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_PIO_ERROR,
+                        "Read error: %s", strerror(errno));
             }
         }
         else {


More information about the parrot-commits mailing list