Navigation Menu

Skip to content

Commit

Permalink
groonga: Don't return "false" as the result of error message
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 23, 2014
1 parent 5a7027c commit a4dfb67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/droonga/plugins/groonga/column_list.rb
Expand Up @@ -42,8 +42,7 @@ def process_request(request)
if table_name.nil? or @context[table_name].nil?
message = "table doesn't exist: <#{table_name.to_s}>"
raise CommandError.new(:status => Status::INVALID_ARGUMENT,
:message => message,
:result => message)
:message => message)
end

columns = list_columns(table_name)
Expand Down
6 changes: 5 additions & 1 deletion lib/droonga/plugins/groonga/generic_command.rb
Expand Up @@ -43,7 +43,11 @@ def execute(request)
result = process_request(request)
[header(Status::SUCCESS), result]
rescue CommandError => error
[header(error.status, error.message), error.result]
unless error.result.nil?
[header(error.status, error.message), error.result]
else
[header(error.status, error.message)]
end
end

private
Expand Down

0 comments on commit a4dfb67

Please sign in to comment.