Home
librmm
libucxx
ucxx
nightly (26.12)
nightly (26.12)
stable (26.10)
legacy (26.08)
Toggle main menu visibility
Loading...
Searching...
No Matches
include
rmm
error.hpp
1
/*
2
* SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
* SPDX-License-Identifier: Apache-2.0
4
*/
5
6
#pragma once
7
8
#include <rmm/detail/export.hpp>
9
10
#include <stdexcept>
11
#include <string>
12
13
RMM_NAMESPACE_BEGIN
14
24
struct
logic_error
:
public
std::logic_error {
25
using
std::logic_error::logic_error;
26
};
27
34
struct
cuda_error
:
public
std::runtime_error {
35
using
std::runtime_error::runtime_error;
36
};
37
44
class
bad_alloc
:
public
std::bad_alloc {
45
public
:
51
bad_alloc
(
const
char
* msg);
52
58
bad_alloc
(std::string
const
& msg);
59
63
[[nodiscard]]
const
char
*
what
() const noexcept override;
64
65
private:
66
std::
string
_what;
67
};
68
76
class
out_of_memory
: public
bad_alloc
{
77
public
:
83
out_of_memory
(
const
char
* msg);
84
90
out_of_memory
(std::string
const
& msg);
91
};
92
99
class
out_of_range
:
public
std::out_of_range {
100
using
std::out_of_range::out_of_range;
101
};
102
108
class
invalid_argument
:
public
std::invalid_argument {
109
using
std::invalid_argument::invalid_argument;
110
};
111
112
RMM_NAMESPACE_END
rmm::bad_alloc::what
const char * what() const noexcept override
The explanatory string.
rmm::bad_alloc::bad_alloc
bad_alloc(std::string const &msg)
Constructs a bad_alloc with the error message.
rmm::bad_alloc::bad_alloc
bad_alloc(const char *msg)
Constructs a bad_alloc with the error message.
rmm::invalid_argument
Exception thrown when an argument to a function is invalid.
Definition
error.hpp:108
rmm::out_of_memory::out_of_memory
out_of_memory(std::string const &msg)
Constructs an out_of_memory with the error message.
rmm::out_of_memory::out_of_memory
out_of_memory(const char *msg)
Constructs an out_of_memory with the error message.
rmm::out_of_range
Exception thrown when attempting to access outside of a defined range.
Definition
error.hpp:99
rmm::cuda_error
Exception thrown when a CUDA error is encountered.
Definition
error.hpp:34
rmm::logic_error
Exception thrown when logical precondition is violated.
Definition
error.hpp:24
Generated by
1.18.0