Log more data for "Cannot select id -1".

Show the incoming id and the length of this._items.

(imported from commit 106dda862918a4f40481a5692cbfee1738218150)
This commit is contained in:
Steve Howell 2013-12-02 15:40:49 -05:00
parent 45a23712ff
commit 00946f97df
1 changed files with 6 additions and 1 deletions

View File

@ -172,7 +172,12 @@ MessageList.prototype = {
}
if (closest_id === -1) {
blueslip.fatal("Cannot select id -1", {table_name: this.table_name});
var error_data = {
table_name: this.table_name,
id: id,
items_length: this._items.length
};
blueslip.fatal("Cannot select id -1", error_data);
}
id = closest_id;