3 void fatal_error(char* msg, CELL tagged)
5 printf("Fatal error: %s %d\n",msg,tagged);
9 void critical_error(char* msg, CELL tagged)
11 printf("Critical error: %s %d\n",msg,tagged);
12 save_image("factor.crash.image");
18 if(env.ds < env.ds_bot + sizeof(ARRAY))
20 if(env.cs <= env.cs_bot + sizeof(ARRAY))
24 void throw_error(CELL error)
30 /* Execute the 'throw' word */
32 env.cf = env.user[BREAK_ENV];
33 /* Return to run() method */
37 void general_error(CELL error, CELL tagged)
39 CONS* c = cons(error,tag_cons(cons(tagged,F)));
40 throw_error(tag_cons(c));
43 void type_error(CELL type, CELL tagged)
45 CONS* c = cons(tag_fixnum(type),tag_cons(cons(tagged,F)));
46 general_error(ERROR_TYPE,tag_cons(c));
49 void range_error(CELL tagged, CELL index, CELL max)
51 CONS* c = cons(tagged,tag_cons(cons(tag_fixnum(index),
52 tag_cons(cons(tag_fixnum(max),F)))));
53 general_error(ERROR_RANGE,c);