Hello --

On Sat, 30 Jun 2001, Yukihiro Matsumoto wrote:

> Hi,
>
> In message "[ruby-talk:17066] RCR: Exception methods (was: Re:  Re: keeping an Exception object alive)"
>     on 01/06/30, David Alan Black <dblack / candle.superlink.net> writes:
>
> |OK, I declare it an RCR :-)  And I'd be glad to put it on the wiki if
> |no one else does.
> |
> |Details:
> |
> |-- add a new method Exception#message=(aString)
> |-- change behavior of Exception#exception so that if the receiver is
> |   an Exception (or descendant) object, it returns the receiver whether
> |   or not a second argument (message) is specified.  Any such second
> |   argument becomes the receiver's message.
> |
> |(This should take care of the #raise behavior described above.)
>
> I'd like to see them as two separate RCRs.

OK -- whoever is updating the wiki (?), please list them separately
there for separate acceptance or denial.  (I guess we can leave them
together here.)

> Question: does "clone" work for the latter?  In other words, do you
> need exact same id for these exceptions, or just "equal" exception
> objects?  FYI, instance variables and singleton methods are copied by
> clone operation.

Yes, clone works, at least in the case(s) that I was playing with
(adding an attribute to NameError and wanting it to travel with the
object).


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav