Skip to content

Commit

Permalink
Rename exception
Browse files Browse the repository at this point in the history
  • Loading branch information
oysand committed Oct 11, 2024
1 parent 704165d commit 426f3b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions src/isar/state_machine/states/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@
RobotCommunicationTimeoutException,
RobotException,
RobotRetrieveInspectionException,
RobotStepStatusException,
RobotTaskStatusException,
)
from robot_interface.models.inspection.inspection import Inspection
from robot_interface.models.mission.mission import Mission
from robot_interface.models.mission.status import TaskStatus
from robot_interface.models.mission.task import Task
from robot_interface.models.mission.task import (
InspectionTask,
)
from robot_interface.models.mission.task import InspectionTask, Task

if TYPE_CHECKING:
from isar.state_machine.state_machine import StateMachine
Expand Down Expand Up @@ -85,7 +82,7 @@ def _run(self) -> None:
else:
continue

except RobotStepStatusException as e:
except RobotTaskStatusException as e:
self.state_machine.current_task.error_message = ErrorMessage(
error_reason=e.error_reason, error_description=e.error_description
)
Expand Down
2 changes: 1 addition & 1 deletion src/robot_interface/models/exceptions/robot_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def __init__(self, error_description: str) -> None:

# An exception which should be thrown by the robot package if it is unable to collect
# the status of the current step.
class RobotStepStatusException(RobotException):
class RobotTaskStatusException(RobotException):
def __init__(self, error_description: str) -> None:
super().__init__(
error_reason=ErrorReason.RobotStepStatusException,
Expand Down

0 comments on commit 426f3b2

Please sign in to comment.