Quote:
length cannot be less than zero
Quite clear. Somewhere you are accessing the
length
property of some
Object
, 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
length
, just check if has any data or not.