From a7df62a0a53bc4518a77f476485ffb8b25afb8a4 Mon Sep 17 00:00:00 2001 From: Pierre MONTAGNIER Date: Sun, 22 Sep 2013 00:26:29 +0200 Subject: [PATCH] Fixed the JSON::ParserError rescue message I guess this message may be more appropriate for this error. --- lib/haste.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/haste.rb b/lib/haste.rb index 9a87b8b..5055c93 100644 --- a/lib/haste.rb +++ b/lib/haste.rb @@ -40,7 +40,7 @@ module Haste abort "failure uploading: #{response.code}" end rescue JSON::ParserError => e - abort "failure uploading: #{response.code}" + abort "failure parsing response: #{e.message}" rescue Errno::ECONNREFUSED => e abort "failure connecting: #{e.message}" end