YUKI Hiroshi
null+****@clear*****
Thu Feb 20 18:25:19 JST 2014
YUKI Hiroshi 2014-02-20 18:25:19 +0900 (Thu, 20 Feb 2014) New Revision: 93e2c99b3e618f07634c993ac617291c0d469126 https://github.com/droonga/fluent-plugin-droonga/commit/93e2c99b3e618f07634c993ac617291c0d469126 Message: Format error messages in short style Modified files: lib/droonga/dispatcher.rb lib/droonga/plugin_registry.rb lib/droonga/searcher.rb Modified: lib/droonga/dispatcher.rb (+3 -4) =================================================================== --- lib/droonga/dispatcher.rb 2014-02-20 18:10:48 +0900 (0439a13) +++ lib/droonga/dispatcher.rb 2014-02-20 18:25:19 +0900 (b4307eb) @@ -31,20 +31,19 @@ module Droonga class MissingDatasetParameter < ErrorMessages::BadRequest def initialize - super("\"dataset\" must be specified.") + super("Missing required parameter: <dataset>") end end class UnknownDataset < ErrorMessages::NotFound def initialize(dataset) - super("The dataset #{dataset.inspect} does not exist.") + super("Unknown dataset: <#{dataset}>") end end class UnknownCommand < ErrorMessages::BadRequest def initialize(command, dataset) - super("The command #{command.inspect} is not available " + - "for the dataset #{dataset.inspect}.") + super("[#{dataset}] Handler not found for the type: <#{command}>") end end Modified: lib/droonga/plugin_registry.rb (+1 -1) =================================================================== --- lib/droonga/plugin_registry.rb 2014-02-20 18:10:48 +0900 (8f5b054) +++ lib/droonga/plugin_registry.rb 2014-02-20 18:25:19 +0900 (3483d74) @@ -19,7 +19,7 @@ module Droonga class UnknownPlugin < Error def initialize(name, klass) - super("Unknown plugin \"#{name}\" is specified for #{klass}.") + super("[#{klass}] Plugin not found: <#{name}>") end end Modified: lib/droonga/searcher.rb (+2 -2) =================================================================== --- lib/droonga/searcher.rb 2014-02-20 18:10:48 +0900 (574d08d) +++ lib/droonga/searcher.rb 2014-02-20 18:25:19 +0900 (d8f23ef) @@ -32,7 +32,7 @@ module Droonga class MissingSourceParameter < ErrorMessages::BadRequest def initialize(query, queries) - super("The query #{query.inspect} has no source. " + + super("[#{query}] No source is specified. " + "Query must have a valid source.", queries) end @@ -40,7 +40,7 @@ module Droonga class UnknownSource < ErrorMessages::NotFound def initialize(source, queries) - super("The source #{source.inspect} does not exist. " + + super("Source not found: <#{source}> " + "It must be a name of an existing table or another query.", queries) end -------------- next part -------------- HTML����������������������������... Download