Skip to content

Improve error message when a wrong type is passed to Spectrometer#292

Merged
ap-- merged 2 commits into
ap--:mainfrom
ederag:quotes
Oct 24, 2025
Merged

Improve error message when a wrong type is passed to Spectrometer#292
ap-- merged 2 commits into
ap--:mainfrom
ederag:quotes

Conversation

@ederag

@ederag ederag commented Jul 17, 2025

Copy link
Copy Markdown
Contributor

Previously the error message was

TypeError: device has to be a `SeaBreezeDevice`

which could be misinterpreted:
it is the variable that has an incorrect type, not the physical spectrometer.

Also display the representation of device, following this example:
https://docs.python.org/3/howto/descriptor.html

ederag added 2 commits July 17, 2025 18:30
Previously the error message was
TypeError: device has to be a `SeaBreezeDevice`
which could be misinterpreted.
It is the variable that has an incorrect type,
not the physical spectrometer.
@ap--

ap-- commented Oct 24, 2025

Copy link
Copy Markdown
Owner

🙏 Thank you @ederag

Sorry for the long delay.

@ap-- ap-- merged commit 65d7146 into ap--:main Oct 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants