lib/spanx/logger.rb in spanx-0.1.1 vs lib/spanx/logger.rb in spanx-0.3.0
- old
+ new
@@ -36,10 +36,10 @@
if returned_from_block.is_a?(String) && returned_from_block != ""
message += " - #{returned_from_block}"
end
log "(#{"%9.2f" % (1000 * elapsed_time)}ms) #{message}"
returned_from_block
- rescue Exception => e
+ rescue StandardError => e
elapsed_time = Time.now - start
log "(#{"%9.2f" % (1000 * elapsed_time)}ms) error: #{e.message} for #{message} "
end
end
end