ruby-patterns icon indicating copy to clipboard operation
ruby-patterns copied to clipboard

Proxy example fix

Open gautam-ndk opened this issue 10 years ago • 4 comments

The proxy example was being terminated without completion because of the exception raised. Made minor changes.

gautam-ndk avatar Feb 22 '16 17:02 gautam-ndk

It's just an example to show how the pattern should be used. Comment explains that this code will raise error in that line so why catch it? It doesn't need to be runnable. You should be able to run it in your head not on your computer. I am downvoting this.

mentero avatar Feb 23 '16 08:02 mentero

Chill out man! Needed a runnable file without any exceptions for one of my app.

gautam-ndk avatar Feb 23 '16 09:02 gautam-ndk

And there is nothing wrong with that :) I just wanted to point out that I see little value (or even a slight loss) in accepting this PR. Please explain to me why you think it should be accepted if you think otherwise

mentero avatar Feb 23 '16 09:02 mentero

Hmm.. I think you misunderstood. I just asked you to chill out. I dint say there was something wrong. I was hoping someone else would look into this thread.

You see, it is fundamentally wrong when to have code after an exception raising statement. And in this case, we have the main logical block which shows the importance of proxy pattern after that exception raising statement, which I believe is wrong.

And I believe all the other samples are working code samples not just theoretical examples.

blah blah blah..blah... ..

No more ranting on this :-) Getting back to work!

gautam-ndk avatar Feb 23 '16 09:02 gautam-ndk