diff --git a/include/rmm/detail/error.hpp b/include/rmm/detail/error.hpp index 6f74dc0ea..bce0d1389 100644 --- a/include/rmm/detail/error.hpp +++ b/include/rmm/detail/error.hpp @@ -230,11 +230,8 @@ class out_of_range : public std::out_of_range { cudaGetLastError(); \ auto const msg = std::string{"CUDA error at: "} + __FILE__ + ":" + RMM_STRINGIFY(__LINE__) + \ ": " + cudaGetErrorName(error) + " " + cudaGetErrorString(error); \ - if (cudaErrorMemoryAllocation == error) { \ - throw rmm::out_of_memory{msg}; \ - } else { \ - throw rmm::bad_alloc{msg}; \ - } \ + if (cudaErrorMemoryAllocation == error) { throw rmm::out_of_memory{msg}; } \ + throw rmm::bad_alloc{msg}; \ } \ } while (0)