From: ts Date: 2002-12-03T23:10:29+09:00 Subject: Re: exception types >>>>> "S" == Shannon Fang writes: S> Can anybody help me on the rescue clause? I tried to catch file not found S> error of file.open method, but I don't know what type of error to use in S> rescue clause. i tried to write nothing after rescue, it seems not catching S> the error. Further more: Well, what error ruby give you ? pigeon% ls aa ls: aa: No such file or directory pigeon% pigeon% ruby -e 'File.open("aa") rescue true' pigeon% S> 1. where can I find a reference to different kind of runtime errors? It S> seems that there are no information on that (Exception Class?) in pickaxe... p. 303 S> 2. in "rescue SyntaxError, NameError => boom", is => used to denote a hash? S> if so, why NameError is a hash? well, begin # do something rescue SyntaxError, NameError => boom # do something end is the same than begin # do something rescue SyntaxError, NameError boom = $! # do something end Guy Decoux S> _________________________________________________________________ S> Tired of spam? Get advanced junk mail protection with MSN 8. S> http://join.msn.com/?page=features/junkmail