lib/tartarus/rescue.rb in tartarus-1.0.0 vs lib/tartarus/rescue.rb in tartarus-1.0.1

- old
+ new

@@ -4,10 +4,12 @@ alias_method_chain :rescue_action, :tartarus end end def rescue_action_with_tartarus(exception) - if response_code_for_rescue(exception) == :internal_server_error + is_exception = response_code_for_rescue(exception) == :internal_server_error + + if is_exception and Tartarus.logging_enabled? Tartarus.log(self, exception) end rescue_action_without_tartarus(exception) end