Errors#

2026-10-26

1 min read time

Applies to Linux

struct logic_error : public std::logic_error#
#include <error.hpp>

Exception thrown when logical precondition is violated.

This exception should not be thrown directly and is instead thrown by the RMM_EXPECTS macro.

struct cuda_error : public std::runtime_error#
#include <error.hpp>

Exception thrown when a CUDA error is encountered.

class bad_alloc : public std::bad_alloc#
#include <error.hpp>

Exception thrown when an RMM allocation fails.

Subclassed by rmm::out_of_memory

Public Functions

bad_alloc(
const char *msg
)#

Constructs a bad_alloc with the error message.

Parameters:

msg – Message to be associated with the exception

bad_alloc(
std::string const &msg
)#

Constructs a bad_alloc with the error message.

Parameters:

msg – Message to be associated with the exception

const char *what(
) const noexcept override#

@briefreturn{The explanatory string}

class out_of_memory : public rmm::bad_alloc#
#include <error.hpp>

Exception thrown when RMM runs out of memory.

This error should only be thrown when we know for sure a resource is out of memory.

Public Functions

out_of_memory(
const char *msg
)#

Constructs an out_of_memory with the error message.

Parameters:

msg – Message to be associated with the exception

out_of_memory(
std::string const &msg
)#

Constructs an out_of_memory with the error message.

Parameters:

msg – Message to be associated with the exception

class out_of_range : public std::out_of_range#
#include <error.hpp>

Exception thrown when attempting to access outside of a defined range.

class invalid_argument : public std::invalid_argument#
#include <error.hpp>

Exception thrown when an argument to a function is invalid.