From: Tobias DiPasquale Date: 2001-12-13T18:02:18+09:00 Subject: [ruby-talk:28398] Re: Documentation of the different Exception types Yukihiro Matsumoto wrote: > [ruby-talk:28397] Re: Documentation of the different Exception types > Hi, > > In message "[ruby-talk:28393] Re: Documentation of the different Exception types" > on 01/12/13, "Harry Ohlsen" writes: > > |> RuntimeError is an exception reserved for lazy programmers. You good > |> programmers should not use this unless you're working on trivial > |> scripts. > | > |Agreed. However, as Tobias said, it's a little hard to know what > |exceptions we should be raising/expecting, because there seems to be no > |real documentation as to when they are raised or what data they contain > |(one could obviously use reflection to work that out, but that seems a > |bit messy, especially since all that tells you is their names, not what > |they're intended purpose is). > > "Ruby in a Nutshell" from O'Reilly has description about built-in > exceptions. I don't know the exact page number, since I haven't get > the author copies yet. That'd be page 94 and 95, Matz. This is a great reference, by the way. You still rock! > |For example, when YOU write code, how do you work out what exceptions to > |write rescue clauses for? Do you have an approach you take to work it > |out, or just a good memory :-) ?? > > I have weaker memory than you might expect. That's why I bought Visor > Edge recently. It's pretty nice toy. Anyway, I often refer to the > "Ruby Pocket Reference" (Japanese version of the above book), or the > source itself. > > matz. All the more reason to supplement our collective crappy memories with more documentation ;-) -- Tobias DiPasquale Solaris System Administrator Electrical and Computer Engineering Dept. Villanova University mailto: anany@ece.vill.edu tel: 610-519-5109