lib/nightcrawler_swift/exceptions.rb in nightcrawler_swift-0.4.0 vs lib/nightcrawler_swift/exceptions.rb in nightcrawler_swift-0.5.0

- old
+ new

@@ -3,15 +3,16 @@ class BaseError < StandardError attr_accessor :original_exception def initialize exception - super(exception.message) + super(exception.is_a?(String) ? exception : exception.message) @original_exception = exception end end class ConnectionError < BaseError; end + class UnauthorizedError < ConnectionError; end class ValidationError < ConnectionError; end class NotFoundError < BaseError; end class ConfigurationError < StandardError; end end end