Module: Grape::ErrorFormatter::Txt
- Defined in:
- lib/grape/error_formatter/txt.rb
Class Method Summary collapse
Class Method Details
.call(message, backtrace, options = {}, env = nil) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/grape/error_formatter/txt.rb', line 5 def call(, backtrace, = {}, env = nil) = Grape::ErrorFormatter::Base.present(, env) result = .is_a?(Hash) ? MultiJson.dump() : if ([:rescue_options] || {})[:backtrace] && backtrace && !backtrace.empty? result += "\r\n " result += backtrace.join("\r\n ") end result end |