From: Intransition Date: 2010-05-18T23:50:49+09:00 Subject: Re: YAML validation On May 18, 10:19 am, Kevin Austin wrote: > Thomas Sawyer wrote: > > Don't think there is any way to do this. I suppose it might be nice if > > there were a syntax check function, but it won't be much different > > than actually trying to parse it. And if you are going to use the > > result if it parses why would you want to waste time doing so twice? > > So catching the error is really the best way to go. > > > ~trans > > That's what I thought was the case. > > Now for my next question > > after I capture my error > > `sort': comparison of String with nil failed (ArgumentError) > > how can I return to my code with my next yaml file? > > aka > rescue >  do crap > end probably 'next' would do if your looping over files. Also there is 'retry'. > a good site or book would be fine http://www.ruby-doc.org/docs/ProgrammingRuby/tut_exceptions.html