More uniform error handling.