That was my decision. It's a religious thing I don't expect everyone to agree with. I'm firmly in the "exceptions should not be used for flow-control" camp. ;-)
The exception being that a get for a specific id should always raise because it's an exceptional situation not to find the object then. So that's the direction things are going in. No bang variations. That said, I have no issue at all with a plugin to add those methods... -Sam On Oct 29, 12:46 pm, Jon Hancock <[EMAIL PROTECTED]> wrote: > Let me start by saying that I like exception oriented code. > That said, most times I would want to use get! instead of get. > > It follows that I would want to use find! and first! as well. But > these do not exist. > I heard a month or so ago that the ! style methods may go away. > > Can one of the dm devs explain the intentions? > > I would really love to see dm have a full set of exception-oriented > finder functions. > > One such function I would like is a "find_one" finder. This would be > a method like one!, or a param to an existing finder, whereby it would > throw an exception if the result returned anything other than one and > only one result. > > just my 2 cents. > thanks, Jon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---
