Sha256: b6001ff3cb1fd9aa7a8956d5449f3b0e8837f1c150eba61d27fde43c08a9ac87

Contents?: true

Size: 1.29 KB

Versions: 5

Compression:

Stored size: 1.29 KB

Contents

# Copyright (C) 2016  Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

module Groonga
  class Client
    class Searcher
      class Error < Client::Error
      end

      class ErrorResponse < Error
        attr_reader :response
        def initialize(response)
          @response = response
          command = @response.command
          status_code = @response.status_code
          error_message = @response.error_message
          message = "failed to execute: #{command.name}: #{status_code}: "
          message << "<#{error_message}>"
          super(message)
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
groonga-client-rails-0.9.4 lib/groonga/client/searcher/error.rb
groonga-client-rails-0.9.3 lib/groonga/client/searcher/error.rb
groonga-client-rails-0.9.2 lib/groonga/client/searcher/error.rb
groonga-client-rails-0.9.1 lib/groonga/client/searcher/error.rb
groonga-client-rails-0.9.0 lib/groonga/client/searcher/error.rb