oneDAL icon indicating copy to clipboard operation
oneDAL copied to clipboard

Improvement: Allow to pass arguments to error message functions

Open keeranroth opened this issue 1 year ago • 4 comments

For debugging purposes, it would be useful to add some context to error messages which are passed as part of thrown exceptions. For example, consider the code in function cpp/oneapi/dal/detail/common.hpp:get_data_type_size, which tries to find the size for a passed data_type. At the end of the function, the error condition is

    ...
    else if (t == data_type::float64) {
        return sizeof(double);
    }
    else {
        throw unimplemented{ dal::detail::error_messages::unsupported_data_type() };
    }

where it would be useful to have more verbose output be possible, taking information about the data type into account, e.g.

    ...
    else {
        throw unimplemented{ dal::detail::error_messages::unsupported_data_type(t) };
    }

Updating the way in which this, and similar, error messages are generated would mean that more verbose and informative messages can be reported on failures.

keeranroth avatar Apr 24 '24 11:04 keeranroth

Hello, I'd be glad to work on this. Can i get the issue assigned? Thanks

Riccardo231 avatar Dec 28 '24 22:12 Riccardo231

@ricor07 , sure. Thanks for volunteering. be free to ask any info that would be useful

napetrov avatar Jan 02 '25 19:01 napetrov

Hi @ricor07, are you still actively working on this issue?

dominik-mich avatar Mar 04 '25 12:03 dominik-mich

Hello, sorry but i'm working on other stuff. Please unassign me

Riccardo231 avatar Mar 04 '25 13:03 Riccardo231