bcolz icon indicating copy to clipboard operation
bcolz copied to clipboard

Suggestion - make exceptions show values / more information

Open de-code opened this issue 8 years ago • 0 comments

All of the exceptions I've encountered so far just told me what parameters mismatched or were invalid, but not what the values were. It would significantly improve debugging if it provided more information.

You might think the called should know what was passed in. But often the values are not passed in directly and are derived.

For example: https://github.com/Blosc/bcolz/blob/master/bcolz/ctable.py#L35 "column {} must be valid Python identifiers, and must not start with an underscore" (where the placeholder is keywords, usually 'names') For example using odo they were derived to be numeric values. Suggestion: include all or only the invalid column names.

https://github.com/Blosc/bcolz/blob/master/bcolz/ctable.py#L303 "columns and names must have the same length" Suggestion: include the length of columns and names

https://github.com/Blosc/bcolz/blob/master/bcolz/ctable.py#L318 "columns input is not supported" Suggestion: include the type of columns and perhaps even the supported types

de-code avatar Sep 27 '17 07:09 de-code