[Rubygems-developers] Re: Re: [ANN] RubyGems 0.2.0
chad at chadfowler.com
Sun Mar 21 13:08:33 EST 2004
Thanks, Lothar. I'm headed out of town, so I'm forwarding this to the
rubygems dev list.
On Mar 21, 2004, at 11:34 AM, Lothar Scholz wrote:
> Hello Chad,
> Sunday, March 21, 2004, 3:03:23 PM, you wrote:
> CF> On Mar 21, 2004, at 8:34 AM, Lothar Scholz wrote:
>>> Hello Chad,
>>> Monday, March 15, 2004, 12:29:18 AM, you wrote:
>>> CF> The first public release of RubyGems
>>> CF> (http://rubygems.rubyforge.org)
>>> CF> has just been uploaded to RubyForge.
>>> Can you please work an a clean and unambiguity way to report errors.
>>> I asks this because we want add a Ruby Gems framework to our Ruby
>>> that comes with our "Arachno Ruby IDE". And the current way of
>>> throwing exceptions isn't very good for a GUI wrapper.
> CF> Hi Lothar. We definitely understand the need to clean up our error
> CF> handling. Given that you have requested us to do so, could you
> give us
> CF> some "requirements" as to how you would like to see it work?
> I think exceptions should be thrown on the toplevel only for program
> errors. Thats in my sense the "exceptional" case.
> But typical errors like connection faults, using a different protocol
> version should result in some more friendly messages - at the command
> line tool level. Whenever i use a command line tool and get an
> exception i think that this is a alpha version and stop using it, only
> when i really need it i look at the problem in more detail.
> Of course defining a very consistent hierarchy of exception classes and
> using the ".message" verbosely - and adding other useful hints to the
> exception object - should be done. With this you could wrap the main
> function in your command line tool and also allow GUI tools to do
> error handling by just calling the same lower level function that the
> command line is doing.
> So whats about something like:
> class RubyGems
> def initialize(....)
> def execute (command line options)
> # no rescue here, a GUI tool would call this and handle the
> # messaegs
> def command_line
> rescue RubyGemException => detail # other exceptions fall through
> # print something helpful here
> And implementing an error handling strategy is one of the things
> that must be done early in a project, and i think after a 0.0.2
> version you have some ideas what could go wrong and define a class
> hierarchy for this errors.
> Best regards,
> mailto:mailinglists at scriptolutions.com
More information about the Rubygems-developers