]> gitweb.factorcode.org Git - factor.git/blobdiff - native/error.c
i/o refactoring continues
[factor.git] / native / error.c
index 7166a532485411b3b36706b9db225379e493e29f..e8d1b23eea25e55db1bbf258e7164bf5479848dd 100644 (file)
@@ -2,13 +2,13 @@
 
 void fatal_error(char* msg, CELL tagged)
 {
-       printf("Fatal error: %s %ld\n",msg,tagged);
+       fprintf(stderr,"Fatal error: %s %ld\n",msg,tagged);
        exit(1);
 }
 
 void critical_error(char* msg, CELL tagged)
 {
-       printf("Critical error: %s %ld\n",msg,tagged);
+       fprintf(stderr,"Critical error: %s %ld\n",msg,tagged);
        save_image("factor.crash.image");
        exit(1);
 }
@@ -59,13 +59,3 @@ void range_error(CELL tagged, CELL index, CELL max)
                tag_cons(cons(tag_fixnum(max),F)))));
        general_error(ERROR_RANGE,tag_cons(c));
 }
-
-void io_error(const char* func)
-{
-       STRING* function = from_c_string(func);
-       STRING* error = from_c_string(strerror(errno));
-
-       CONS* c = cons(tag_object(function),tag_cons(
-               cons(tag_object(error),F)));
-       general_error(ERROR_IO,tag_cons(c));
-}