Mailinglist Archive: opensuse-ruby (23 mails)

< Previous Next >
Re: [opensuse-ruby] Don't confuse raise+rescue with throw+catch.
  • From: josef reidinger <jreidinger@xxxxxxx>
  • Date: Fri, 02 Oct 2009 11:07:46 +0200
  • Message-id: <4AC5C2E2.5090205@xxxxxxx>
Martin Vidner napsal(a):
First post11!

Just a reminder, I have just fixed a bug:
http://git.opensuse.org/?p=projects/yast/web-client.git;a=commitdiff;h=6412a2edd4215cad514586479695747bf8822573

To illustrate how it bites, the attached program does this
$ ruby snippets/throw-rescue.rb
Doing it right
I have rescued Ouch!
Doing it wrong
I have rescued Exception is not a symbol



Yes, it is often my problem. I programmed too much in java and sometime
mistake. Stupid is that throw is Kernel function and it is not easy to
find it.
--
To unsubscribe, e-mail: opensuse-ruby+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-ruby+help@xxxxxxxxxxxx

< Previous Next >
List Navigation
References