Sha256: b701908e91bf8972821de290336690710c60791f0626e31457eae1690324f9ba

Contents?: true

Size: 422 Bytes

Versions: 6

Compression:

Stored size: 422 Bytes

Contents

# frozen_string_literals: true

module Lumberjack
  class Formatter
    # Format an exception including the backtrace.
    class ExceptionFormatter
      def call(exception)
        message = "#{exception.class.name}: #{exception.message}"
        message << "#{Lumberjack::LINE_SEPARATOR}  #{exception.backtrace.join("#{Lumberjack::LINE_SEPARATOR}  ")}" if exception.backtrace
        message
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
lumberjack-1.1.1 lib/lumberjack/formatter/exception_formatter.rb
lumberjack-1.1.0 lib/lumberjack/formatter/exception_formatter.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/lumberjack-1.0.13/lib/lumberjack/formatter/exception_formatter.rb
alimentos-alu0100945645-0.1.0 vendor/bundle/ruby/2.3.0/gems/lumberjack-1.0.13/lib/lumberjack/formatter/exception_formatter.rb
alimentos-alu0100945645-1.0.0 vendor/bundle/ruby/2.3.0/gems/lumberjack-1.0.13/lib/lumberjack/formatter/exception_formatter.rb
lumberjack-1.0.13 lib/lumberjack/formatter/exception_formatter.rb