Change 'have_error' to 'ret' for simplicity.