Improve error messages by making exceptions optional