|
|
Author: paultcochrane
Date: Thu Jun 28 12:56:33 2007
New Revision: 19409
Modified:
trunk/src/io/io.c
trunk/src/io/io_buf.c
trunk/src/io/io_layers.c
trunk/src/io/io_unix.c
Log:
[src/io] Replaced internal_exception() with real_exception() where possible.
Modified: trunk/src/io/io.c
==============================================================================
--- trunk/src/io/io.c (original)
+++ trunk/src/io/io.c Thu Jun 28 12:56:33 2007
@@ -219,7 +219,7 @@
/* memsub system is up and running: */
/* Init IO stacks and handles for interp instance. */
if (PIO_init_stacks(interp) != 0) {
- internal_exception(PIO_ERROR, "PIO init stacks failed.");
+ real_exception(interp, NULL, PIO_ERROR, "PIO init stacks failed.");
}
/*
@@ -246,11 +246,11 @@
interp->piodata = mem_allocate_typed(ParrotIOData);
if (interp->piodata == NULL)
- internal_exception(PIO_ERROR, "PIO alloc piodata failure.");
+ real_exception(interp, NULL, PIO_ERROR, "PIO alloc piodata failure.");
interp->piodata->default_stack = NULL;
interp->piodata->table = mem_sys_allocate_zeroed(PIO_NR_OPEN *
sizeof(ParrotIO *));
if (interp->piodata->table == NULL)
- internal_exception(PIO_ERROR, "PIO alloc table failure.");
+ real_exception(interp, NULL, PIO_ERROR, "PIO alloc table failure.");
}
@@ -380,7 +380,7 @@
* see also #36677
char buf[1024];
sprintf(buf, "Parrot IO: Failed init layer(%s).\n", p->name);
- internal_exception(PIO_ERROR, buf);
+ real_exception(interp, NULL, PIO_ERROR, buf);
*/
;
}
Modified: trunk/src/io/io_buf.c
==============================================================================
--- trunk/src/io/io_buf.c (original)
+++ trunk/src/io/io_buf.c Thu Jun 28 12:56:33 2007
@@ -514,7 +514,7 @@
size_t got;
/* exception if we're unbuffered */
if (io->b.size == 0)
- internal_exception(PIO_ERROR, "Can't peek at unbuffered PIO");
+ real_exception(interp, NULL, PIO_ERROR, "Can't peek at unbuffered
PIO");
got = PIO_buf_fill_readbuf(interp, l, io, b);
len = (len < got) ? len : got;
Modified: trunk/src/io/io_layers.c
==============================================================================
--- trunk/src/io/io_layers.c (original)
+++ trunk/src/io/io_layers.c Thu Jun 28 12:56:33 2007
@@ -173,8 +173,9 @@
ParrotIOLayer * newlayer;
string_cstring_free(cls);
- if (!l)
- internal_exception(1, "Layer not found");
+ if (!l) {
+ real_exception(interp, NULL, 1, "Layer not found");
+ }
/* make private copy */
newlayer = PIO_base_new_layer(l);
Modified: trunk/src/io/io_unix.c
==============================================================================
--- trunk/src/io/io_unix.c (original)
+++ trunk/src/io/io_unix.c Thu Jun 28 12:56:33 2007
@@ -274,7 +274,7 @@
return fcntl(io->fd, F_SETFL, rflags);
}
# else
- internal_exception(PIO_NOT_IMPLEMENTED, "Async support not available");
+ real_exception(interp, NULL, PIO_NOT_IMPLEMENTED, "Async support not
available");
# endif
return -1;
}
@@ -1115,7 +1115,7 @@
perror("fork");
# else
- internal_exception(UNIMPLEMENTED, "pipe() unimplemented");
+ real_exception(interp, NULL, UNIMPLEMENTED, "pipe() unimplemented");
# endif
return NULL;
}
|
|