Quote:length cannot be less than zero
Quite clear. Somewhere you are accessing the
property of some
, which is not having any data in it. So, it would throw you exception.
Debug your code and see the line where it throws the exception. Before doing anything with the
, just check if has any data or not.