Permalink
Browse files

Improve shard-id validation message

  • Loading branch information...
1 parent 3f2add8 commit a879a86c7a903fdb38f4df8b0c73409e91727f01 @stuhood stuhood committed Mar 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/gizzard/thrift.rb
@@ -35,7 +35,7 @@ def self.parse(string)
if groups = string.match(/(.*)\/([^_]+_\d+_\d{3,}.*)/)
new(*groups.values_at(1, 2))
else
- raise "Invalid shard id: " + string
+ raise "Invalid shard id '#{string}': shard ids are composed of '<table-prefix>_<table-id>_<three-or-more-digit-id>[_<optional-suffix>]'"
end
end
end

0 comments on commit a879a86

Please sign in to comment.