Sha256: 3b93065c57cdb9b3cdab5b9d20cf9cfb46290954f9b479b40721c715952fcb6a

Contents?: true

Size: 1.27 KB

Versions: 6

Compression:

Stored size: 1.27 KB

Contents

module GnipApi
  module Errors
    module Configuration
      class InvalidOutputFormat < StandardError
        def initialize msg="Invalid output format. Available formats: #{GnipApi::Configuration::OUTPUT_FORMATS}"
          @message = msg
        end
      end
    end

    module JsonParser
      class ParseError < StandardError
      end
    end

    module Adapter
      class RequestError < StandardError
        def initialize msg='Request failed'
          @message = msg
        end
      end
    end

    module PowerTrack
      class MissingRules < StandardError
        def initialize
          @message = 'No rules provided to operate'
        end
      end
    end

    module Search
      class MissingParameters < StandardError
        def initialize missing_params
          @message = "Missing required parameters: #{missing_params}"
        end
      end
    end

    class MissingCredentials < StandardError
      def initialize
        @message = 'No credentials provided'
      end
    end
    
    class MissingAdapter < StandardError
      def initialize
        @message = 'No adapter selected'
      end
    end
  end
end

module Gnip
  class UndefinedMessage < StandardError
    def initialize 
      @message = 'Could not recognize message received'
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gnip_api-1.1.0 lib/gnip_api/errors.rb
gnip_api-1.0.6 lib/gnip_api/errors.rb
gnip_api-1.0.5 lib/gnip_api/errors.rb
gnip_api-1.0.4 lib/gnip_api/errors.rb
gnip_api-1.0.3 lib/gnip_api/errors.rb
gnip_api-1.0.2 lib/gnip_api/errors.rb