If there is an exception raised in my worker I rescue it and throw it into the log. This is decent, but it would really help to find out more information. Like the line number, the stack trace, etc. Is this possible? Thanks for your help. Thank You, Ben Johnson E: bjohnson at contuitive.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060806/f1d4a33f/attachment.html
On Aug 6, 2006, at 1:42 PM, Ben Johnson wrote:> If there is an exception raised in my worker I rescue it and throw > it into the log. This is decent, but it would really help to find > out more information. Like the line number, the stack trace, etc. > Is this possible? > > Thanks for your help. > > Thank You, > Ben Johnson > E: bjohnson at contuitive.comHey Ben- If I understand what you want I think you can use the same thing I use to rescue and print the stack trace to the log file. Like this in your worker wherever you do a recuse: begin #something that might raise rescue Exception => e @logger.error "#{ e.message } - (#{ e.class })" << "\n" << (e.backtrace or []).join("\n") end Does that help or am I misunderstanding? Cheers- -Ezra -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060806/f8e6903e/attachment.html
Ezra, this helped me. Thanks. You mentioned once that you were going to put in support for breakpoint. Is that still on the table? Cheers, Brett On 8/7/06, Ezra Zygmuntowicz <ezmobius at gmail.com> wrote:> > > > On Aug 6, 2006, at 1:42 PM, Ben Johnson wrote: > > If there is an exception raised in my worker I rescue it and throw it into > the log. This is decent, but it would really help to find out more > information. Like the line number, the stack trace, etc. Is this possible? > > Thanks for your help. > > Thank You, > Ben Johnson > E: bjohnson at contuitive.com > > > Hey Ben- > > If I understand what you want I think you can use the same thing I use to > rescue and print the stack trace to the log file. Like this in your worker > wherever you do a recuse: > > begin > #something that might raise > rescue Exception => e > @logger.error "#{ e.message } - (#{ e.class })" << "\n" << > (e.backtrace or []).join("\n") > end > > Does that help or am I misunderstanding? > > Cheers- > -Ezra > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > >
Yeah breakpoint will be in the next release. -Ezra On Aug 7, 2006, at 12:43 AM, Brett Walker wrote:> Ezra, this helped me. Thanks. > > You mentioned once that you were going to put in support for > breakpoint. Is that still on the table? > > Cheers, > Brett > > On 8/7/06, Ezra Zygmuntowicz <ezmobius at gmail.com> wrote: >> >> >> >> On Aug 6, 2006, at 1:42 PM, Ben Johnson wrote: >> >> If there is an exception raised in my worker I rescue it and throw >> it into >> the log. This is decent, but it would really help to find out more >> information. Like the line number, the stack trace, etc. Is this >> possible? >> >> Thanks for your help. >> >> Thank You, >> Ben Johnson >> E: bjohnson at contuitive.com >> >> >> Hey Ben- >> >> If I understand what you want I think you can use the same thing >> I use to >> rescue and print the stack trace to the log file. Like this in >> your worker >> wherever you do a recuse: >> >> begin >> #something that might raise >> rescue Exception => e >> @logger.error "#{ e.message } - (#{ e.class })" << "\n" << >> (e.backtrace or []).join("\n") >> end >> >> Does that help or am I misunderstanding? >> >> Cheers- >> -Ezra >> _______________________________________________ >> Backgroundrb-devel mailing list >> Backgroundrb-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/backgroundrb-devel >> >> > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel >