nimi-python
nimi-python copied to clipboard
NI-DCPower: Calling `session.channels["2"].get_channel_name()` or `get_channel_names()` should raise a more relevant / specific exception
Description of issue
Currently, calling session.channels["2"].get_channel_name() or session.channels["2"].get_channel_names() would result in AttributeError: '_SessionBase' object has no attribute 'get_channel_name'. Ideally, we could improve on it and raise a custom exception that is more relevant and specific. This fix may be applicable to other drivers as well.