homing: Remove EndstopError

There's no reason to distinguish between an EndstopError and a
CommandError, so just use CommandError.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-09-04 11:41:57 -04:00
parent 1f3a160f47
commit f6dd97b784
11 changed files with 21 additions and 25 deletions

View file

@ -101,8 +101,8 @@ class Homing:
for s, name, spos, epos in end_mcu_pos:
if spos == epos:
if probe_pos:
raise EndstopError("Probe triggered prior to movement")
raise EndstopError(
raise CommandError("Probe triggered prior to movement")
raise CommandError(
"Endstop %s still triggered after retract" % (name,))
def home_rails(self, rails, forcepos, movepos):
# Notify of upcoming homing operation
@ -161,7 +161,4 @@ def multi_complete(printer, completions):
class CommandError(Exception):
pass
class EndstopError(CommandError):
pass
Coord = collections.namedtuple('Coord', ('x', 'y', 'z', 'e'))