Skip to content

Commit

Permalink
tweaked logging in case of an exception
Browse files Browse the repository at this point in the history
  • Loading branch information
purzelrakete committed Jan 31, 2009
1 parent 5b62559 commit 897ab1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/workling/base.rb
Expand Up @@ -39,8 +39,11 @@ def dispatch_to_worker_method(method, options)
begin
self.send(method, options)
rescue Exception => e
raise e if e.kind_of?(Workling::WorklingError) || Workling.raise_exceptions?
raise e if e.kind_of?(Workling::WorklingError)
logger.error "WORKLING ERROR: runner could not invoke #{ self.class }:#{ method } with #{ options.inspect }. error was: #{ e.inspect }\n #{ e.backtrace.join("\n") }"

# reraise after logging. the exception really can't go anywhere in many cases. (spawn traps the exception)
raise e if Workling.raise_exceptions?
end
end

Expand Down

0 comments on commit 897ab1f

Please sign in to comment.