improve assertion on wrong number of errors
Merge pull request #441 from c089/improve-assertion-message-for-wrong-number-of-errors

improve assertion on wrong number of errors