Made some of the error-message-generation-related utility methods part of the public API.