Skip to content

Commit

Permalink
Added error message for raise_when_nil.
Browse files Browse the repository at this point in the history
  • Loading branch information
hopsoft committed Mar 2, 2015
1 parent a2b333b commit 848d069
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/queryable_hash/wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def find_first(*queries, nil_value: nil, raise_when_nil: nil)
end
first ||= nil_value

raise NotFoundError if raise_when_nil && first == nil_value
raise NotFoundError.new("#{queries.join(", ")} not found") if raise_when_nil && first == nil_value
first
end

Expand Down

0 comments on commit 848d069

Please sign in to comment.