Skip to content

Parameterize exception type caught by failure_callback_resource_adaptor#898

Merged
rapids-bot[bot] merged 7 commits intorapidsai:branch-21.12from
harrism:fea-parameterize-callback-mr-exception-type
Nov 9, 2021
Merged

Parameterize exception type caught by failure_callback_resource_adaptor#898
rapids-bot[bot] merged 7 commits intorapidsai:branch-21.12from
harrism:fea-parameterize-callback-mr-exception-type

Conversation

@harrism
Copy link
Member

@harrism harrism commented Oct 27, 2021

#892 added failure_callback_resource_adaptor which provides the ability to respond to memory allocation failures. However, it was hard-coded to catch (and rethrow) std::bad_alloc exceptions. This PR makes the type of exception the adaptor catches a template parameter, to provide greater flexibility. The default exception type is now rmm::out_of_memory since we expect this to be the common use case.

Also a few changes to fix clang-tidy warnings.

@github-actions github-actions bot added the cpp Pertains to C++ code label Oct 27, 2021
@harrism harrism added breaking Breaking change improvement Improvement / enhancement to an existing function labels Oct 27, 2021
@harrism harrism self-assigned this Oct 27, 2021
@harrism harrism marked this pull request as ready for review October 27, 2021 00:47
@harrism harrism requested a review from a team as a code owner October 27, 2021 00:47
Copy link
Member

@madsbk madsbk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @harrism

@ajschmidt8
Copy link
Member

rerun tests

1 similar comment
@harrism
Copy link
Member Author

harrism commented Nov 9, 2021

rerun tests

@harrism
Copy link
Member Author

harrism commented Nov 9, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 728a117 into rapidsai:branch-21.12 Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking change cpp Pertains to C++ code improvement Improvement / enhancement to an existing function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants