Use Invocation errors for expected errors.
This commit is contained in:
parent
3f54084d14
commit
19a6943d60
4 changed files with 8 additions and 6 deletions
|
|
@ -713,11 +713,11 @@ class AutofocusThing(lt.Thing):
|
|||
return "success", capture_id
|
||||
|
||||
|
||||
class NotAPeakError(RuntimeError):
|
||||
class NotAPeakError(lt.exceptions.InvocationError):
|
||||
"""The data to fit isn't a peak."""
|
||||
|
||||
|
||||
class NoFocusFoundError(RuntimeError):
|
||||
class NoFocusFoundError(lt.exceptions.InvocationError):
|
||||
"""No focus found during looping Autofocus."""
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ SettingsType = TypeVar("SettingsType", bound=BaseModel)
|
|||
BackgroundType = TypeVar("BackgroundType", bound=BaseModel)
|
||||
|
||||
|
||||
class MissingBackgroundDataError(RuntimeError):
|
||||
class MissingBackgroundDataError(lt.exceptions.InvocationError):
|
||||
"""An error raised if checking for sample without background data set."""
|
||||
|
||||
|
||||
class ChannelBlankError(RuntimeError):
|
||||
class ChannelBlankError(lt.exceptions.InvocationError):
|
||||
"""An error raised if a channel has no measured standard deviation.
|
||||
|
||||
This is not physical and usually means the camera has not yet booted or changed
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ class RomDataTracker:
|
|||
return {axis: int(turning_loc), other_axis: other_coord, "z": int(turning_z)}
|
||||
|
||||
|
||||
class ParasiticMotionError(Exception):
|
||||
class ParasiticMotionError(lt.exceptions.InvocationError):
|
||||
"""Custom exception raised when parasitic motion is detected.
|
||||
|
||||
Parasitic motion is when motion in the direction not being measured
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue