Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename exception #622

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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