Version with error handling.