[Rake-devel] [PATCH] safe_ln

Assaph Mehr assaph at gmail.com
Sun Apr 2 19:39:48 EDT 2006


Hi Jim,

Thanks for the quick response.

> I decided to just catch StandardError in safe_ln, on the theory
> that if ln fails for any reason it is probably ok to try the copy.

Sorry, that doesn't work. NotImplementedError does not derive from
StandardError. You'll have to catch Excpetion:

irb(main):003:0> NotImplementedError.ancestors
=> [NotImplementedError, ScriptError, Exception, Object, Find,
FileTest, FileUtils, FileUtils::StreamUtils_, PP::ObjectMixin, Kernel]

irb(main):004:0> StandardError.ancestors
=> [StandardError, Exception, Object, Find, FileTest, FileUtils,
FileUtils::StreamUtils_, PP::ObjectMixin, Kernel]

Cheers,
Assaph



More information about the Rake-devel mailing list