Sha256: 85638f9a1195f219b247d5a5c562968fec1dfa4d6f75c88bf13e88ab80e9b476

Contents?: true

Size: 451 Bytes

Versions: 11

Compression:

Stored size: 451 Bytes

Contents

module Grape
  module ErrorFormatter
    module Txt
      class << self

        def call(message, backtrace, options = {}, env = nil)
          result = message.is_a?(Hash) ? MultiJson.dump(message) : message
          if (options[:rescue_options] || {})[:backtrace] && backtrace && ! backtrace.empty?
            result += "\r\n "
            result += backtrace.join("\r\n ")
          end
          result
        end

      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
grape-0.6.0 lib/grape/error_formatter/txt.rb
grape-0.5.0 lib/grape/error_formatter/txt.rb
grape-0.4.1 lib/grape/error_formatter/txt.rb
grape-0.4.0 lib/grape/error_formatter/txt.rb
grape-0.3.2 lib/grape/error_formatter/txt.rb
grape-0.3.1 lib/grape/error_formatter/txt.rb
grape-0.3.0 lib/grape/error_formatter/txt.rb
grape-0.2.6 lib/grape/error_formatter/txt.rb
grape-0.2.5 lib/grape/error_formatter/txt.rb
grape-0.2.4 lib/grape/error_formatter/txt.rb
grape-0.2.3 lib/grape/error_formatter/txt.rb