From: "Iñaki Baz Castillo" Date: 2009-10-22T22:11:01+09:00 Subject: Re: Creating and raising custom exception in Ruby C extension El Jueves, 22 de Octubre de 2009, Nikolai Lugovoi escribió: > On Thu, Oct 22, 2009 at 3:55 PM, Iñaki Baz Castillo wrote: > > VALUE class_standard_error = rb_const_get(rb_cObject, > > rb_intern("StandardError")); VALUE argv[0]; > > VALUE new_error = rb_class_new_instance(0, argv, > > class_standard_error); rb_raise(new_error, "Oh an error ocurred !!!"); > > why not simple: > > VALUE custom_error = rb_define_class("CustomError", rb_eStandardError); > rb_raise(custom_error, "An error occured!"); Thanks, I've realized right now that first parameter in "rb_raise" can be "VALUE class". Let me try :) Really thanks a lot. -- Iñaki Baz Castillo