From ef7709233b5b745c72626b3516cc097ecbf78489 Mon Sep 17 00:00:00 2001 From: milap-neupane Date: Wed, 11 Oct 2017 16:00:22 +0545 Subject: [PATCH] Include original_exception in readme for custom error formatter --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 960e6aae84..92db23855b 100644 --- a/README.md +++ b/README.md @@ -2083,7 +2083,7 @@ Custom error formatters for existing and additional types can be defined with a ```ruby class Twitter::API < Grape::API - error_formatter :txt, ->(message, backtrace, options, env) { + error_formatter :txt, ->(message, backtrace, options, env, original_exception) { "error: #{message} from #{backtrace}" } end @@ -2093,7 +2093,7 @@ You can also use a module or class. ```ruby module CustomFormatter - def self.call(message, backtrace, options, env) + def self.call(message, backtrace, options, env, original_exception) { message: message, backtrace: backtrace } end end