Sha256: 5a054e792bab69ec09426f1a83f728f0fb48f924afb04ae55a4a432b473d83fd

Contents?: true

Size: 528 Bytes

Versions: 10

Compression:

Stored size: 528 Bytes

Contents

module NightcrawlerSwift
  module Exceptions

    class BaseError < StandardError
      attr_accessor :original_exception

      def initialize exception
        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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
nightcrawler_swift-1.0.0 lib/nightcrawler_swift/exceptions.rb
nightcrawler_swift-0.11.1 lib/nightcrawler_swift/exceptions.rb
nightcrawler_swift-0.11.0 lib/nightcrawler_swift/exceptions.rb
nightcrawler_swift-0.10.0 lib/nightcrawler_swift/exceptions.rb
nightcrawler_swift-0.9.0 lib/nightcrawler_swift/exceptions.rb
nightcrawler_swift-0.8.1 lib/nightcrawler_swift/exceptions.rb
nightcrawler_swift-0.8.0 lib/nightcrawler_swift/exceptions.rb
nightcrawler_swift-0.7.0 lib/nightcrawler_swift/exceptions.rb
nightcrawler_swift-0.6.0 lib/nightcrawler_swift/exceptions.rb
nightcrawler_swift-0.5.0 lib/nightcrawler_swift/exceptions.rb