Exception types should be differentiated
For exception handling, it would be nicer to have a bunch of exception subclasses that allow differentiating different errors.
List of what LpgbtException is currently used for:
- Control pin access error (should be
- "Delay out of range" for phase shifter (should be just
- "BERT Timeout"
- "EOM Timeout"
- "ADC Timeout"
- Incorrect fuse bank provided (should just be
- Unexpected Error during Fusing
- Fusing timeout
- Timeout while waiting for PUSM state
- I2C master:
- SDA is low before xaction
- transaction not acknowledged
- procmon timeout
I propose a list of additional exceptions as follows:
LpgbtTimeoutError: for BERT, EOM, ADC, Fusing, Procmon and I2C master timeouts
LpgbtI2CMasterBusError: for I2C master SDA fault condition
LpgbtI2CMasterNAKError: for I2C master transaction NAK error
LpgbtFuseError: for unexpected error during fusing
@nguettou @pevicent does this address all the needs you have to differentiate exceptions? Is handling all the timeouts in a single exception type sufficient or would we need to have more granular exception types available here (possibly as subtypes of