Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

tweaked logging in case of an exception

  • Loading branch information...
commit 897ab1f2c3a1e6dd98f9c424f4bcc55420586396 1 parent 5b62559
@purzelrakete purzelrakete authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/workling/base.rb
View
5 lib/workling/base.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.