[Groonga-commit] ranguba/chupa-text at 44f299d [master] Add unknown encoding error

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Mar 1 23:48:59 JST 2017


Kouhei Sutou	2017-03-01 23:48:59 +0900 (Wed, 01 Mar 2017)

  New Revision: 44f299de293907f92d0b072e734513044d6a58b0
  https://github.com/ranguba/chupa-text/commit/44f299de293907f92d0b072e734513044d6a58b0

  Message:
    Add unknown encoding error

  Modified files:
    lib/chupa-text/error.rb

  Modified: lib/chupa-text/error.rb (+11 -2)
===================================================================
--- lib/chupa-text/error.rb    2017-02-19 22:20:03 +0900 (3e07885)
+++ lib/chupa-text/error.rb    2017-03-01 23:48:59 +0900 (2644343)
@@ -22,7 +22,7 @@ module ChupaText
     attr_reader :data
     def initialize(data)
       @data = data
-      super("Encrypted data: <#{data.path}>(#{data.mime_type})")
+      super("Encrypted data: <#{data.uri}>(#{data.mime_type})")
     end
   end
 
@@ -31,7 +31,16 @@ module ChupaText
     def initialize(data, detail)
       @data = data
       @detail = detail
-      super("Invalid data: <#{data.path}>(#{data.mime_type}): <#{detail}>")
+      super("Invalid data: <#{data.uri}>(#{data.mime_type}): <#{detail}>")
+    end
+  end
+
+  class UnknownEncodingError < Error
+    attr_reader :data, :encoding
+    def initialize(data, encoding)
+      @data = data
+      @encoding = encoding
+      super("Unknown encoding data: <#{data.uri}>(#{data.mime_type}): <#{encoding}>")
     end
   end
 end
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index