static public Method

Exception.new(...)

Exception.new(msg = nil)     exception

Construct a new Exception object, optionally passing in a message.

Source Code

/*
* call-seq:
*    Exception.new(msg = nil)   =>  exception
*
*  Construct a new Exception object, optionally passing in 
*  a message.
*/

static VALUE
exc_initialize(argc, argv, exc)
   int argc;
   VALUE *argv;
   VALUE exc;
{
   VALUE arg;

   rb_scan_args(argc, argv, "01", &arg);
   rb_iv_set(exc, "mesg", arg);
   rb_iv_set(exc, "bt", Qnil);

   return exc;
}
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.