Navigation Menu

Skip to content

Commit

Permalink
Report error with full message
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jan 15, 2015
1 parent bfc34e4 commit 376e834
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/droonga/client/message_validator.rb
Expand Up @@ -42,20 +42,20 @@ def validate(message)
private
def validate_id(message)
unless message["id"]
raise MissingId.new(message["id"])
raise MissingId.new(message)
end
end

def validate_dataset(message)
unless message["dataset"]
raise MissingDataset.new(message["dataset"])
raise MissingDataset.new(message)
end
end

def validate_date(message)
Time.parse(message["date"])
rescue ArgumentError => error
raise InvalidDate.new(message["date"])
raise InvalidDate.new(message)
end
end
end
Expand Down

0 comments on commit 376e834

Please sign in to comment.