gcode: Use the same underlying error object for homing and gcode errors

Introduce a homing.CommandError and use that as the basis for both
gcode and EndstopError exceptions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-06-03 12:48:35 -04:00 committed by KevinOConnor
parent 97adca18c4
commit 945a84c0ea
2 changed files with 26 additions and 24 deletions

View file

@ -146,7 +146,10 @@ class Homing:
self.toolhead.motor_off()
raise
class EndstopError(Exception):
class CommandError(Exception):
pass
class EndstopError(CommandError):
pass
def EndstopMoveError(pos, msg="Move out of range"):