From: nobu.nokada@... Date: 2003-06-24T17:08:31+09:00 Subject: Re: [REXML] ParseExtension Hi, At Tue, 24 Jun 2003 10:22:14 +0900, Sean Russell wrote: > > Furthermore, sorry if I'm missing something, you seem to mix > > bare Exception, ParseException and RuntimeError inconsistently. > > Do I? I don't remember conciously generating a RuntimeError; I *may* > generate plain Exceptions, although I tried to be consistent in using > ParseExceptions in the parser... I don't use ParseExceptions anywhere > else in REXML, I hope. Raising with just message sends RuntimeError, not Exception. Ruby itself never raise raw Exception. You use such RuntimeError, Exception and ParseException. > > And, in parsers/baseparser.rb, "raise $!" hides further > > backtrace. This might make debug harder. > > Oh, reraising an exception doesn't preserve the backtrace? That > surprises me, and it's not very helpful. I'll check on that. You can do just `raise' without arguments. Then the backtrace is preserved. -- Nobu Nakada