>>>>> "S" == Sean Middleditch <elanthis / users.sourceforge.net> writes:

S> Alright, I have that working now, everything is nice.  However, not I
S> have another problem - when I use rb_protect, and an exception occurs,
S> how can my app find out which exception occured?  It'd be useful to be
S> able to print these errors for the script writers. 

 Something like this (not tested)

    c = rb_protect(tt_protect, (VALUE)args, &state);
    if (state) {
        c = rb_gv_get("$!");
	c = rb_funcall(c, rb_intern("to_s"), 0);
        fprintf(stderr, "%.*s", RSTRING(c)->len, RSTRING(c)->ptr);
    } 


Guy Decoux