From: "Iñaki Baz Castillo" Date: 2009-10-22T21:40:13+09:00 Subject: Re: Creating and raising custom exception in Ruby C extension El Jueves, 22 de Octubre de 2009, Iñaki Baz Castillo escribió: > Hi, I'm trying to create a CustomError exception in a Ruby C extension and > raise it: > > VALUE class_standard_error = rb_const_get(rb_cObject, > rb_intern("StandardError")); VALUE class_custom_error = > rb_define_class_under(class_standard_error, "ClassError", rb_cObject); > rb_raise(class_custom_error, "Oh, a custom error occurred !!!"); Ops, this is wrong as ClassError should be a child of StandardError rather than a be under it. -- Iñaki Baz Castillo