Job 35:15

But now, because it is not so, he hath visited in his anger; yet he knoweth it not in great extremity:

The verse belongs to Elihu's line of reasoning in the book of Job and cannot be taken to mean that all the speeches in that book are right. The friends of Job frequently uttered principles that were true in general yet false in their use against him. In the same way, affliction is no proof that the sufferer lies under divine displeasure and no reason for discouragement.