Logs an exception.
# File lib/rescuers/base.rb, line 11 def log(exception) return if @logger.nil? klass = exception.class.name # We can omit the message if it's identical to the class name. message = exception.message unless exception.message == klass # Indent the exception so it stands apart from the rest of the messages. backtrace = @logger.indent(exception.backtrace) @logger.debug("Rescuer") { "rescued: #{klass}#{": #{message}" if message}\n#{backtrace}" } end
Generated with the Darkfish Rdoc Generator 2.