An example in Exception Handling with Ruby

Source file is attached. I’m new to this forum so I don’t know if there
are options for code formatting… but i have attached the source code.
This program can be seen in action at the following link:

http://codepad.org/QDrSdEGA

I think this is a clever way to illustrate how exception handling is
controlled in Ruby. Sorry there aren’t any comments…

Sorry the link above is broken.

Use this one instead

http://codepad.org/iXXJwYrU

I updated the file and added comments.

Here you go

http://codepad.org/qVPc35hV

On Fri, Nov 30, 2012 at 5:43 AM, Nathan Mr. [email protected]
wrote:

I updated the file and added comments.

Here you go

http://codepad.org/qVPc35hV

All three codepad links came up 404. How clever is that?

Attachments:
http://www.ruby-forum.com/attachment/7914/can_happen.rb

If you intend to provide good examples for people learning exception
handling: as a learner I would prefer several examples which each do
one thing
. Also, there would have to be explanation of what is
demonstrated - and meaningful names.

Cheers

robert

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs