[Backgroundrb-devel] Debugging a worker?

Brett Walker lapomme00 at gmail.com
Mon Aug 7 03:43:24 EDT 2006


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
>
>


More information about the Backgroundrb-devel mailing list