Hello, I was just wondering if backtrace was supported yet with Exceptions. In my code, I had this: rescue Exception => e However, the backtrace is always nil. puts e puts e.backtrace.nil? Is this a known issue? Is there anyway to find out what is \ isn''t implemented yet? trunk\tests\ironruby\Runtime\Exception spec''s don''t seem to cover backtrace. Thanks Ben
I don''t know if its implemented yet, but you should also check the RubySpecs to se what is tested. -----Original Message----- From: Ben Hall <ben2004uk at googlemail.com> Sent: September 28, 2008 4:19 AM To: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org> Subject: [Ironruby-core] Backtrace supported? Hello, I was just wondering if backtrace was supported yet with Exceptions. In my code, I had this: rescue Exception => e However, the backtrace is always nil. puts e puts e.backtrace.nil? Is this a known issue? Is there anyway to find out what is \ isn''t implemented yet? trunk\tests\ironruby\Runtime\Exception spec''s don''t seem to cover backtrace. Thanks Ben _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Hi Jim, Sorry, I got confused by your tests and RubySpecs E:\IronRuby\trunk\build\release>rake mspec:core Exception (in E:/IronRuby/trunk) ........................................ Finished in 8.744558 seconds 21 files, 40 examples, 40 expectations, 0 failures, 0 errors However, I had a quick look at what was included. backtrace_spec.rb is empty. Git commit notification seems to imply its waiting for someone to write it :) Are many of the specs empty? I assume they are a work in progress... Thanks Ben On Sun, Sep 28, 2008 at 7:55 PM, Jim Deville <jdeville at microsoft.com> wrote:> I don''t know if its implemented yet, but you should also check the RubySpecs to se what is tested. > > -----Original Message----- > From: Ben Hall <ben2004uk at googlemail.com> > Sent: September 28, 2008 4:19 AM > To: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org> > Subject: [Ironruby-core] Backtrace supported? > > > Hello, > > I was just wondering if backtrace was supported yet with Exceptions. > > In my code, I had this: > rescue Exception => e > > However, the backtrace is always nil. > > puts e > puts e.backtrace.nil? > > Is this a known issue? Is there anyway to find out what is \ isn''t > implemented yet? > > trunk\tests\ironruby\Runtime\Exception spec''s don''t seem to cover backtrace. > > Thanks > > Ben > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >
Yeah, they are a work in progress. Backtrace is probably hard to spec because it may differ implementation to implementation. JD -----Original Message----- From: Ben Hall <ben2004uk at googlemail.com> Sent: September 28, 2008 2:57 PM To: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org> Subject: Re: [Ironruby-core] Backtrace supported? Hi Jim, Sorry, I got confused by your tests and RubySpecs E:\IronRuby\trunk\build\release>rake mspec:core Exception (in E:/IronRuby/trunk) ........................................ Finished in 8.744558 seconds 21 files, 40 examples, 40 expectations, 0 failures, 0 errors However, I had a quick look at what was included. backtrace_spec.rb is empty. Git commit notification seems to imply its waiting for someone to write it :) Are many of the specs empty? I assume they are a work in progress... Thanks Ben On Sun, Sep 28, 2008 at 7:55 PM, Jim Deville <jdeville at microsoft.com> wrote:> I don''t know if its implemented yet, but you should also check the RubySpecs to se what is tested. > > -----Original Message----- > From: Ben Hall <ben2004uk at googlemail.com> > Sent: September 28, 2008 4:19 AM > To: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org> > Subject: [Ironruby-core] Backtrace supported? > > > Hello, > > I was just wondering if backtrace was supported yet with Exceptions. > > In my code, I had this: > rescue Exception => e > > However, the backtrace is always nil. > > puts e > puts e.backtrace.nil? > > Is this a known issue? Is there anyway to find out what is \ isn''t > implemented yet? > > trunk\tests\ironruby\Runtime\Exception spec''s don''t seem to cover backtrace. > > Thanks > > Ben > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >_______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Could you sent the script where you see the behavior? What parameters do you pass on command line? I tried this and it works: a.rb: def foo bar end def bar raise end begin foo rescue p $! puts $!.backtrace end C:\Temp>ir -D a.rb #<RuntimeError: RuntimeError> a.rb:6:in `bar'' a.rb:2:in `foo'' a.rb:10 Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Sunday, September 28, 2008 6:51 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Backtrace supported? Yeah, they are a work in progress. Backtrace is probably hard to spec because it may differ implementation to implementation. JD -----Original Message----- From: Ben Hall <ben2004uk at googlemail.com> Sent: September 28, 2008 2:57 PM To: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org> Subject: Re: [Ironruby-core] Backtrace supported? Hi Jim, Sorry, I got confused by your tests and RubySpecs E:\IronRuby\trunk\build\release>rake mspec:core Exception (in E:/IronRuby/trunk) ........................................ Finished in 8.744558 seconds 21 files, 40 examples, 40 expectations, 0 failures, 0 errors However, I had a quick look at what was included. backtrace_spec.rb is empty. Git commit notification seems to imply its waiting for someone to write it :) Are many of the specs empty? I assume they are a work in progress... Thanks Ben On Sun, Sep 28, 2008 at 7:55 PM, Jim Deville <jdeville at microsoft.com> wrote:> I don''t know if its implemented yet, but you should also check the RubySpecs to se what is tested. > > -----Original Message----- > From: Ben Hall <ben2004uk at googlemail.com> > Sent: September 28, 2008 4:19 AM > To: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org> > Subject: [Ironruby-core] Backtrace supported? > > > Hello, > > I was just wondering if backtrace was supported yet with Exceptions. > > In my code, I had this: > rescue Exception => e > > However, the backtrace is always nil. > > puts e > puts e.backtrace.nil? > > Is this a known issue? Is there anyway to find out what is \ isn''t > implemented yet? > > trunk\tests\ironruby\Runtime\Exception spec''s don''t seem to cover backtrace. > > Thanks > > Ben > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >_______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Sure, i''ll zip up the code and send it over to you. Ben On Mon, Sep 29, 2008 at 3:47 AM, Tomas Matousek <Tomas.Matousek at microsoft.com> wrote:> Could you sent the script where you see the behavior? What parameters do you pass on command line? > > I tried this and it works: > > a.rb: > > def foo > bar > end > > def bar > raise > end > > begin > foo > rescue > p $! > puts $!.backtrace > end > > > C:\Temp>ir -D a.rb > #<RuntimeError: RuntimeError> > a.rb:6:in `bar'' > a.rb:2:in `foo'' > a.rb:10 > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville > Sent: Sunday, September 28, 2008 6:51 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Backtrace supported? > > Yeah, they are a work in progress. Backtrace is probably hard to spec because it may differ implementation to implementation. > > JD > > -----Original Message----- > From: Ben Hall <ben2004uk at googlemail.com> > Sent: September 28, 2008 2:57 PM > To: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org> > Subject: Re: [Ironruby-core] Backtrace supported? > > > Hi Jim, > > Sorry, I got confused by your tests and RubySpecs > > E:\IronRuby\trunk\build\release>rake mspec:core Exception > (in E:/IronRuby/trunk) > ........................................ > > Finished in 8.744558 seconds > > 21 files, 40 examples, 40 expectations, 0 failures, 0 errors > > However, I had a quick look at what was included. backtrace_spec.rb > is empty. Git commit notification seems to imply its waiting for > someone to write it :) > > Are many of the specs empty? I assume they are a work in progress... > > Thanks > > Ben > > On Sun, Sep 28, 2008 at 7:55 PM, Jim Deville <jdeville at microsoft.com> wrote: >> I don''t know if its implemented yet, but you should also check the RubySpecs to se what is tested. >> >> -----Original Message----- >> From: Ben Hall <ben2004uk at googlemail.com> >> Sent: September 28, 2008 4:19 AM >> To: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org> >> Subject: [Ironruby-core] Backtrace supported? >> >> >> Hello, >> >> I was just wondering if backtrace was supported yet with Exceptions. >> >> In my code, I had this: >> rescue Exception => e >> >> However, the backtrace is always nil. >> >> puts e >> puts e.backtrace.nil? >> >> Is this a known issue? Is there anyway to find out what is \ isn''t >> implemented yet? >> >> trunk\tests\ironruby\Runtime\Exception spec''s don''t seem to cover backtrace. >> >> Thanks >> >> Ben >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >
Are you running IronRuby in compilation or interpret mode? I have a feeling that the stack tracing might not work right in interpret mode. Is that right Tomas? RubySpecs are definitely a work in progress and anything you can do to help push them along would be warmly welcomed, in my experience! By the way, be careful running rake mspec:... By default it runs under ci mode which doesn''t run specs that have a fail tag. See ironruby-tags project that you should have got from Git. (ci stands for continuous integration and is designed to catch regression bugs) Try running with run as the runner. I.E. rake mspec:core Exception - run. This will also run those tagged specs and give a much better idea of what is implemented/working in IronRuby. Of course if the specs are empty then this won''t make any difference. Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ben Hall Sent: Monday,29 September 29, 2008 10:51 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Backtrace supported? Sure, i''ll zip up the code and send it over to you. Ben On Mon, Sep 29, 2008 at 3:47 AM, Tomas Matousek <Tomas.Matousek at microsoft.com> wrote:> Could you sent the script where you see the behavior? What parameters doyou pass on command line?> > I tried this and it works: > > a.rb: > > def foo > bar > end > > def bar > raise > end > > begin > foo > rescue > p $! > puts $!.backtrace > end > > > C:\Temp>ir -D a.rb > #<RuntimeError: RuntimeError> > a.rb:6:in `bar'' > a.rb:2:in `foo'' > a.rb:10 > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org[mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville> Sent: Sunday, September 28, 2008 6:51 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Backtrace supported? > > Yeah, they are a work in progress. Backtrace is probably hard to specbecause it may differ implementation to implementation.> > JD > > -----Original Message----- > From: Ben Hall <ben2004uk at googlemail.com> > Sent: September 28, 2008 2:57 PM > To: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org> > Subject: Re: [Ironruby-core] Backtrace supported? > > > Hi Jim, > > Sorry, I got confused by your tests and RubySpecs > > E:\IronRuby\trunk\build\release>rake mspec:core Exception > (in E:/IronRuby/trunk) > ........................................ > > Finished in 8.744558 seconds > > 21 files, 40 examples, 40 expectations, 0 failures, 0 errors > > However, I had a quick look at what was included. backtrace_spec.rb > is empty. Git commit notification seems to imply its waiting for > someone to write it :) > > Are many of the specs empty? I assume they are a work in progress... > > Thanks > > Ben > > On Sun, Sep 28, 2008 at 7:55 PM, Jim Deville <jdeville at microsoft.com>wrote:>> I don''t know if its implemented yet, but you should also check theRubySpecs to se what is tested.>> >> -----Original Message----- >> From: Ben Hall <ben2004uk at googlemail.com> >> Sent: September 28, 2008 4:19 AM >> To: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org> >> Subject: [Ironruby-core] Backtrace supported? >> >> >> Hello, >> >> I was just wondering if backtrace was supported yet with Exceptions. >> >> In my code, I had this: >> rescue Exception => e >> >> However, the backtrace is always nil. >> >> puts e >> puts e.backtrace.nil? >> >> Is this a known issue? Is there anyway to find out what is \ isn''t >> implemented yet? >> >> trunk\tests\ironruby\Runtime\Exception spec''s don''t seem to coverbacktrace.>> >> Thanks >> >> Ben >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >_______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
I implemented some basic support last week, so you will get some traces - it''s not finished yet though, so you might also get some failed assertions or imprecise traces. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin Sent: Monday, September 29, 2008 6:04 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Backtrace supported? Are you running IronRuby in compilation or interpret mode? I have a feeling that the stack tracing might not work right in interpret mode. Is that right Tomas? RubySpecs are definitely a work in progress and anything you can do to help push them along would be warmly welcomed, in my experience! By the way, be careful running rake mspec:... By default it runs under ci mode which doesn''t run specs that have a fail tag. See ironruby-tags project that you should have got from Git. (ci stands for continuous integration and is designed to catch regression bugs) Try running with run as the runner. I.E. rake mspec:core Exception - run. This will also run those tagged specs and give a much better idea of what is implemented/working in IronRuby. Of course if the specs are empty then this won''t make any difference. Pete -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ben Hall Sent: Monday,29 September 29, 2008 10:51 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Backtrace supported? Sure, i''ll zip up the code and send it over to you. Ben On Mon, Sep 29, 2008 at 3:47 AM, Tomas Matousek <Tomas.Matousek at microsoft.com> wrote:> Could you sent the script where you see the behavior? What parameters doyou pass on command line?> > I tried this and it works: > > a.rb: > > def foo > bar > end > > def bar > raise > end > > begin > foo > rescue > p $! > puts $!.backtrace > end > > > C:\Temp>ir -D a.rb > #<RuntimeError: RuntimeError> > a.rb:6:in `bar'' > a.rb:2:in `foo'' > a.rb:10 > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org[mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville> Sent: Sunday, September 28, 2008 6:51 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Backtrace supported? > > Yeah, they are a work in progress. Backtrace is probably hard to specbecause it may differ implementation to implementation.> > JD > > -----Original Message----- > From: Ben Hall <ben2004uk at googlemail.com> > Sent: September 28, 2008 2:57 PM > To: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org> > Subject: Re: [Ironruby-core] Backtrace supported? > > > Hi Jim, > > Sorry, I got confused by your tests and RubySpecs > > E:\IronRuby\trunk\build\release>rake mspec:core Exception > (in E:/IronRuby/trunk) > ........................................ > > Finished in 8.744558 seconds > > 21 files, 40 examples, 40 expectations, 0 failures, 0 errors > > However, I had a quick look at what was included. backtrace_spec.rb > is empty. Git commit notification seems to imply its waiting for > someone to write it :) > > Are many of the specs empty? I assume they are a work in progress... > > Thanks > > Ben > > On Sun, Sep 28, 2008 at 7:55 PM, Jim Deville <jdeville at microsoft.com>wrote:>> I don''t know if its implemented yet, but you should also check theRubySpecs to se what is tested.>> >> -----Original Message----- >> From: Ben Hall <ben2004uk at googlemail.com> >> Sent: September 28, 2008 4:19 AM >> To: ironruby-core at rubyforge.org <ironruby-core at rubyforge.org> >> Subject: [Ironruby-core] Backtrace supported? >> >> >> Hello, >> >> I was just wondering if backtrace was supported yet with Exceptions. >> >> In my code, I had this: >> rescue Exception => e >> >> However, the backtrace is always nil. >> >> puts e >> puts e.backtrace.nil? >> >> Is this a known issue? Is there anyway to find out what is \ isn''t >> implemented yet? >> >> trunk\tests\ironruby\Runtime\Exception spec''s don''t seem to coverbacktrace.>> >> Thanks >> >> Ben >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >_______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core