Skip to content

Correct error handling to not use BaseException#248

Merged
daniel-montanari merged 7 commits intoPyFixate:mainfrom
Overlord360:error-handling
Feb 27, 2026
Merged

Correct error handling to not use BaseException#248
daniel-montanari merged 7 commits intoPyFixate:mainfrom
Overlord360:error-handling

Conversation

@Overlord360
Copy link
Contributor

Splits off #229 as we don't have push access to Riley's branch / fork.

I've added a top level FixateError as per Clint's recommendation in #229

Riley King and others added 5 commits September 5, 2025 13:22
…eption`. No script catches it meaning that if the FTDI driver raises an exception while a power supply is live, it will not be turned off.
…rances of BaseException with Exception. Realistically there is no reason to be using BaseException over Exception unless you want to kill the program.
@aedwards-ampcontrol
Copy link

aedwards-ampcontrol commented Feb 25, 2026

@daniel-montanari and another one for your review please.

@daniel-montanari
Copy link
Collaborator

@Overlord360 do the excepts for BaseException in main, sequencer.py and common,py need to be changed?
Looking over the previous PR an skimming over the code it looks ok to me, but wanted to make sure someone else has also checked.

Has anyone done any checks with atgrep to make sure there aren't scripts that will break unexpectedly?

@Overlord360
Copy link
Contributor Author

@Overlord360 do the excepts for BaseException in main, sequencer.py and common,py need to be changed? Looking over the previous PR an skimming over the code it looks ok to me, but wanted to make sure someone else has also checked.

Has anyone done any checks with atgrep to make sure there aren't scripts that will break unexpectedly?

@daniel-montanari
Since Exception inherits from BaseException the sequencer.py BaseExcecption excepts will work just as they have until now.

As for other test scripts there appear to be four places where BaseException are used in test scripts.

image

The three uses in the ELV jig use the retry_exceptions variable inherited from the TestClass class in fixate which has been deprecated for 8 years
image

In the Rockstarter protection board test script it's used to create a custom exception. This should be changed to inherit from Exception instead of BaseException.
That being said. This will still act the same as the exception handling in the sequencer has not been changed.

Copy link
Collaborator

@daniel-montanari daniel-montanari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good just add to release notes please

@Overlord360
Copy link
Contributor Author

Looks good just add to release notes please

@daniel-montanari Done!

@daniel-montanari daniel-montanari merged commit 07ea377 into PyFixate:main Feb 27, 2026
3 checks 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.

3 participants