Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
It might be misleading as error is the first argument. I tried using your code and realized that txCount was always giving null and then I got to know that it is error. This might be misleading for newbies.