From: Cliff Phiri Date: 2010-10-27T00:17:20+09:00 Subject: Re: error handling: two flavors? --0015174c1982473a8e04938661c0 Content-Type: text/plain; charset=ISO-8859-1 Stop On Tue, Oct 26, 2010 at 7:54 AM, Grary Stimon wrote: > Hi, > > I recall reading somewhere (can't remember where) that there are two > flavors of error handling available in ruby: 1) for truly unexpected > contingencies, and 2) for other infrequent but expected contingencies. > > So, I expect a method to return a value, including nil. But > if the method cannot return a value, including nil, i want it to return > a result along the lines of 2), above. it's not that i didn't anticipate > the case that my method might not be able to return a value, including > nil, rather, if it can't then i need to know based on some indicator > other > than nil, which is a meaningful value for my method! > > can anyone refresh me on whether there are these two flavors of error > handling in ruby? > > Grar > > -- > Posted via http://www.ruby-forum.com/. > > --0015174c1982473a8e04938661c0--