streamline CUDA error handling