A good error dialog or warning dialog gives a user the following information:
What happened (from the user's point of view)
Why it happened, in simple language
How to fix the problem