lib/zold/json_page.rb in zold-0.18.0 vs lib/zold/json_page.rb in zold-0.18.1

- old
+ new

@@ -38,9 +38,10 @@ def to_hash raise 'JSON is empty, can\'t parse' + (@uri.empty? ? '' : " at #{@uri}") if @text.empty? JSON.parse(@text) rescue JSON::ParserError => e - raise "Failed to parse JSON #{@uri.empty? ? '' : "at #{@uri}"} (#{e.message}): #{@text.inspect}" + raise "Failed to parse JSON #{@uri.empty? ? '' : "at #{@uri}"} (#{e.message}): \ +#{@text.inspect.gsub(/^.{200,}$/, '\1...')}" end end end