ni / nidaqmx-python

A Python API for interacting with NI-DAQmx
Other
428 stars 154 forks source link

Improve error reporting in some cases #550

Closed texasaggie97 closed 5 months ago

texasaggie97 commented 5 months ago

What does this Pull Request accomplish?

If for some reason the extended error message is blank, the DaqError ends up not showing any output when it is printed. This can happen if the DLL doesn't properly load plugins. If message is blank, try to put at least something in to the message that is then given to the parent Error class.

Changed DaqReadError and DaqWriteError to let DaqError handle setting the message

Why should this Pull Request be merged?

Improves error reporting

What testing has been done?

Local testing

github-actions[bot] commented 5 months ago

Test Results

    34 files  ±    0      34 suites  ±0   41m 33s :stopwatch: + 1m 10s  2 232 tests +  160   1 896 :white_check_mark: +  192    336 :zzz:  -  32  0 :x: ±0  39 446 runs  +2 720  33 910 :white_check_mark: +3 264  5 536 :zzz:  - 544  0 :x: ±0 

Results for commit a41ab876. ± Comparison against base commit e9022510.

This pull request removes 32 and adds 192 tests. Note that renamed tests count towards both. ``` tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_str___shared_interpreter[grpc_init_kwargs-ai_physical_chans] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_str___shared_interpreter[grpc_init_kwargs-ao_physical_chans] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_str___shared_interpreter[grpc_init_kwargs-ci_physical_chans] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_str___shared_interpreter[grpc_init_kwargs-co_physical_chans] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_str___shared_interpreter[grpc_init_kwargs-di_lines] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_str___shared_interpreter[grpc_init_kwargs-di_ports] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_str___shared_interpreter[grpc_init_kwargs-do_lines] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_str___shared_interpreter[grpc_init_kwargs-do_ports] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_str___shared_interpreter[library_init_kwargs-ai_physical_chans] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_str___shared_interpreter[library_init_kwargs-ao_physical_chans] … ``` ``` tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_mixed_str_list___name[grpc_init_kwargs-ai_physical_chans] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_mixed_str_list___name[grpc_init_kwargs-ao_physical_chans] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_mixed_str_list___name[grpc_init_kwargs-ci_physical_chans] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_mixed_str_list___name[grpc_init_kwargs-co_physical_chans] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_mixed_str_list___name[grpc_init_kwargs-di_lines] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_mixed_str_list___name[grpc_init_kwargs-di_ports] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_mixed_str_list___name[grpc_init_kwargs-do_lines] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_mixed_str_list___name[grpc_init_kwargs-do_ports] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_mixed_str_list___name[library_init_kwargs-ai_physical_chans] tests.component.system._collections.test_physical_channel_collection ‑ test___physical_channels___getitem_mixed_str_list___name[library_init_kwargs-ao_physical_chans] … ```

:recycle: This comment has been updated with latest results.