C API: Get the error associated with a RUBY_EVENT_RAISE even

Hi,

I’m using rb_add_event_hook() with the RUBY_EVENT_RAISE flag, and I’m
struggling to find a function to tell me what error actually happened.
I know where it happened with rb_backtrace() which is great, but I still
need the name of the error.

Maybe I’m looking in the wrong place, but the documentation for the C
API is
pretty much non-existent. Sure, we have doxygen generated lists of files
and
functions but that’s next to worthless without a description of what
each
function does. The README only seems to cover the most common tasks, and
brief at that.

Cheers
Ian.

On Wed, Nov 01, 2006 at 10:31:54PM +0900, Ian L. wrote:

Hi,

I’m using rb_add_event_hook() with the RUBY_EVENT_RAISE flag, and I’m
struggling to find a function to tell me what error actually happened.
I know where it happened with rb_backtrace() which is great, but I still
need the name of the error.

The last exception raised is stored in ruby_errinfo.

Maybe I’m looking in the wrong place, but the documentation for the C API is
pretty much non-existent. Sure, we have doxygen generated lists of files and
functions but that’s next to worthless without a description of what each
function does. The README only seems to cover the most common tasks, and
brief at that.

I agree; we should have better C documentation. What we do have:

Perhaps someone should start a project to document the API.

Paul