I have this in a delayed job.

  def perform
    begin
    validation_warnings =
Account.global_import_legacy_accounts(billing_run.legacy_master_iif_csv.path)
    rescue Exception => e
    BackgroundProcessStatus.update(:status => "Process failed. Error:
#{e}.")
    end
  end

I am finding that if an exception ocurrs somewhere in the code which is
being called (i.e. somewhere in Account#global_import_legacy_accounts), the
job just quits and does not go into my rescue clause. Am I confused that if
I have something wrapped in an begin..rescue that any exception below it
should raise up to this clause, or am I just having flashbacks of how C#
handles it? Anyway, what I need is a strategy to send a message and do
something if anything goes wrong in my delayed_job.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to