module Scrivito class CommunicationError < StandardError attr_reader :http_code, :message def initialize(message, http_code) @http_code = http_code.to_i @message = message end def to_s "HTTP-Response-Code: #{self.http_code}, Body: \"#{self.message}\"" end end end