Menu

#2 canny exists on (fatal) failure

open
nobody
None
5
2007-08-08
2007-08-08
Anonymous
No

There are lot's of

puts fatal_error
exit

passages in your code. This is not the ruby way; you should create and throw an exception; maybe something like this:

class CannyException < Exception
end

And at all passages you do as described above you should simply do the following:

raise CannyException.new(fatal_error)

So one can rescue the exception and do some error reportment.

Discussion


Log in to post a comment.