Skip to content

Error handling issues in calculate_distance function of distance-based task distribution module #146

Closed

Description

@Ayush5120

Extension of issue #134
The calculate_distance function in the distance-based task distribution module has an issue with exception handling, leading to unexpected behavior or errors. Specifically:

  • ip_distance function is called to calculate distances between all IPs. However, if it raises a ValueError, the exception is ignored, which could lead to incorrect results or unexpected behavior if the distances_full variable is used later in the code.
  • Similarly, a KeyError exception is ignored when trying to access the distances_full dictionary, which might lead to incorrect outputs.

To solve this issue handle these exceptions more robustly, for example, by logging the exception or raising an error to alert the user that something has gone wrong.

Activity

  1. self-assigned this
    on Mar 13, 2023
  2. changed the title [-]Error handling issues in calculate_distance function in distance-based task distribution module[/-] [+]Error handling issues in calculate_distance function of distance-based task distribution module[/+] on Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions