From: Iain Dooley Date: 2005-08-29T21:36:50+09:00 Subject: Re: catching segmentation faults from Ruby ts wrote: >>>>>>"I" == Iain Dooley writes: > > > I> it appears that i can't pass the name of a C function to rb_protect. > > use a typecast okay, so i was able to use: rb_protect((VALUE (*)(VALUE))executeApplication,(VALUE)0,&status); thanks very much for your advice. however, we are back to the original problem, because what is actually happening is not a ruby exception, but is in fact a segmentation fault, caused by a line such as this: @parent.child("nonexistentChildWidget").text because this code is being edited at runtime, if the user mistypes the name of a child for example, then tests the code, i want an error to pop saying "there was an error in your code" or something. at the moment, it dies like this: matt_test.rb:9: [BUG] Segmentation fault ruby 1.8.2 (2004-12-25) [i386-freebsd5] Abort (core dumped) so i need a way to catch a segmentation fault, not ruby exceptions. cheers iain