=begin
Hi,
I've made a first draft of a description for all Exception subclasses, and would encourage anyone interested in improving it by editing the wiki:
http://redmine.ruby-lang.org/wiki/ruby/ExceptionClassesDoc
Outstanding work!
My comments:
NotImplementedError
Raised when a method is not implemented on the current platform.
I prefer "feature" to "method", because some method is actually
defined but NotImplementedError may be raised depending on the
argument (e.g., Process.uid=).
SyntaxError
Raised when attempting to parse Ruby code with an invalid syntax.
I could be paranoid, but SyntaxError may be raised in compile
phase. So "execute" would be better than "parse".
LocalJumpError
Raised when attempting to return out of a context that no longer exists.
There is simpler situation: no block given (yield).
Attempting to return across Threads will also raise LocalJumpError.
def foo
Thread.new { return }.join
end
foo
But I don't have better concrete explanation. Sorry.
NameError
Raised when a given name is invalid (e.g. a constant's name can not be "my_constant" since it must start with a capital letter)
It will also be raised when referring undefined (uninitialized)
local variable.
undefined local variable or method `foo' for main:Object (NameError)
Anyway, I agree with importing them.
--
Yusuke Endoh mame@tsg.ne.jp
=end