[Groonga-commit] droonga/fluent-plugin-droonga at 96224e2 [master] Remove StartupError class

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Feb 12 13:25:41 JST 2014


YUKI Hiroshi	2014-02-12 13:25:41 +0900 (Wed, 12 Feb 2014)

  New Revision: 96224e29ae206c3c781757150945c17e75ad5a2a
  https://github.com/droonga/fluent-plugin-droonga/commit/96224e29ae206c3c781757150945c17e75ad5a2a

  Message:
    Remove StartupError class

  Removed files:
    lib/droonga/startup_error.rb
  Modified files:
    lib/droonga/catalog.rb
    lib/droonga/catalog_loader.rb

  Modified: lib/droonga/catalog.rb (+1 -2)
===================================================================
--- lib/droonga/catalog.rb    2014-02-12 12:50:17 +0900 (e3d268f)
+++ lib/droonga/catalog.rb    2014-02-12 13:25:41 +0900 (c65a6ec)
@@ -16,13 +16,12 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 require "droonga/catalog_loader"
-require "droonga/startup_error"
 
 module Droonga
   class << self
     attr_accessor :catalog
   end
 
-  class InvalidCatalog < StartupError
+  class InvalidCatalog < StandardError
   end
 end

  Modified: lib/droonga/catalog_loader.rb (+1 -1)
===================================================================
--- lib/droonga/catalog_loader.rb    2014-02-12 12:50:17 +0900 (099db36)
+++ lib/droonga/catalog_loader.rb    2014-02-12 13:25:41 +0900 (488c404)
@@ -29,7 +29,7 @@ module Droonga
       end
       Catalog::Version1.new(data, File.dirname(@path))
     rescue JSON::ParserError => error
-      raise InvalidCatalog.new("Syntax error in #{@path}", error)
+      raise InvalidCatalog.new("Syntax error in #{@path}\n#{error.to_s}")
     end
   end
 end

  Deleted: lib/droonga/startup_error.rb (+0 -36) 100644
===================================================================
--- lib/droonga/startup_error.rb    2014-02-12 12:50:17 +0900 (072d2e1)
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2014 Droonga Project
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License version 2.1 as published by the Free Software Foundation.
-#
-# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-module Droonga
-  class StartupError < StandardError
-    attr_reader :message, :detail
-
-    def initialize(message, detail=nil)
-      @message = message
-      @detail = detail
-    end
-
-    def to_s
-      detail = @edatil
-      if detail
-        detail = detail.to_s
-        detail = "\n#{detail.to_s}" unless detail.empty?
-      end
-      "#{self.class.name}\n#{@message}#{detail}"
-    end
-  end
-end
-------------- next part --------------
HTML����������������������������...
Download 



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