Added extra detail to exception messages.

This is useful for debugging.