Improving `Program` exception information.

Review by @inmost-light.