lib/peddler/errors/error.rb in peddler-1.4.1 vs lib/peddler/errors/error.rb in peddler-1.5.0

- old
+ new

@@ -1,13 +1,26 @@ module Peddler + # @api private module Errors + KNOWN = %w( + AccessDenied + InvalidMarketplace + InvalidParameterValue + QuotaExceeded + RequestThrottled + ).freeze + # @api private class Error < StandardError attr_reader :cause def initialize(msg, cause) @cause = cause super msg end + end + + KNOWN.each do |name| + const_set name, Class.new(Error) end end end