From: Sandor Szuecs Date: 2010-07-13T23:26:29+09:00 Subject: Re: Errors in Ruby On Jul 13, 2010, at 2:07 PM, Abder-rahman Ali wrote: > In the following sentence: The raise method is from the Kernel module. > By default, raise creates an exception of the RuntimeError class. From: > http://rubylearning.com/satishtalim/ruby_exceptions.html > > > What is meant by raising an exception of the "RunTimeError"? And, if we > raise it on "ArgumentError", what is mean by that? irb:0> ArgumentError.ancestors => [ArgumentError, StandardError, Exception, Object, Kernel] irb:0> RuntimeError.ancestors => [RuntimeError, StandardError, Exception, Object, Kernel] irb:0> RuntimeError.superclass => StandardError irb:0> ArgumentError.superclass => StandardError irb:0> begin irb:1* raise "foo" irb:1> rescue Exception => e irb:1> puts e.class irb:1> end RuntimeError Hth, Sandor Szücs --