Marnen Laibow-Koser wrote: > Um, WTF? That's where logic is supposed to go. Exception handling > supplements that logic; it doesn't replace it. > There are times when it might be necessary (methods that >> involve rake tasks etc. come to mind) but overall, rescue is something >> everyone new to rails should learn and implement into their apps. >>
I didn't use the right wording here. What I meant was there are different types of logic to use with your model. In otherwords, for every method created there are probably 3 people that will do them completely different but achieve the same result. Remember for loops? Which logic is better to do in the model? A for loop or an each loop? Which is better practice? This is what I was after. You can go to an extreme on one thing and never use the simpler approaches. > Many developers (including me!) perhaps don't use exceptions quite as > often as they should, but I am afraid that you are encouraging the > opposite extreme -- a style of programming where exceptions are used for > everything. I understand that this is not a great idea for a number of > reasons: it is said to be inefficient and hard to follow and test. > I'm not sure I follow you completely on this particular response. Are you saying that rescue is a bad thing when you need a routine to continue moving forward? Or, are you saying that there's another way (besides rescue) that should be used to do the same thing? I like rescue. I don't use it for everything but there are some core areas in my app that I do use it. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---