[FEA] Throw more specific exceptions in libcudf #12885
Labels
2 - In Progress
Currently a work in progress
feature request
New feature or request
libcudf
Affects libcudf (C++/CUDA) code.
Is your feature request related to a problem? Please describe.
The discussion in #10200 demonstrated a general desire to have libcudf provide more useful diagnostics of failure modes to users by throwing more informative exceptions for different types of failures instead of always throwing
cudf::logic_error
. #12426 implemented the necessary scaffolding in cuDF Python and the libcudf JNI to allow libcudf to use any C++ exception -- including custom exceptions defined within libcudf -- and have these mapped to appropriate Java or Python exceptions. #12426 also demonstrated how such a custom exception could be defined, introducingcudf::data_type_error
. The purpose of this issue is to serve as tracking for the task of systematically converting libcudf to throw better exceptions.Describe the solution you'd like
I propose that we tackle this task on a file-by-file basis. This issue can serve as a tracker for which files have been updated as well as the definitive source of what exceptions libcudf throws under what circumstances. For each file, a developer would go through each CUDF_EXPECTS/CUDF_FAIL call and see if there is a suitable alternative to
cudf::logic_error
. If none currently exists, developers should propose a new exception and explain situations in which it should be used in a new issue. If the proposal is accepted, the table of exceptions below should be updated.Table of exceptions:
data_type
for which the function is invalid. A common example is in the default SFINAE overloads of type-dispatched functions.List of files to be updated (please add new lines to the task list when a file is updated):
The text was updated successfully, but these errors were encountered: